当前位置: 动力学知识库 > 问答 > 编程问答 >

Login on a C Unix server using sockets

问题描述:

I'm trying to create a server where some users have more rights than others. The user would send his username and password, the server would check if they are correct and assign a flag to that user.

My idea is that after the client sends the username and password, I would write the address of the socket assigned to them in a file/array and I would know that that socket is assigned to a client with admin privileges every time the clients sends an administrator request, by checking it's socket address with the 'approved' list.

Is there any other way to do this?

分享给朋友:
您可能感兴趣的文章:
随机阅读: