Logo Search packages:      
Sourcecode: qtsmbstatus version File versions  Download package

void ClientSocket::CmdKillUser ( const QString &  texte  )  [private]

Request from client to disconnect an user

Parameters:
texte arg1=PID, arg2=username
See also:
ClientSocket::permitDisconnectUser

process_smbd_exist

Definition at line 220 of file clientsocket.cpp.

References AuthUser, ObjError(), permitDisconnectUser, core_syntax::returnArg(), and sendToClient().

{
      debugQt(" ClientSocket :: CmdKillUser()");
      core_syntax stx(texte);
      if (!AuthUser) // if not authenticated
      {
            debugQt("Client not authenticated !");
            sendToClient(error_auth,"Not authenticated !");
      }
      else // if authenticated
      {
            if (!permitDisconnectUser) // if client is authorized
            {
                  debugQt("Client is unauthorized to disconnect an user !");
                  sendToClient(error_obj,tr("Unauthorized request!"));
                  return;
            }
            QString pid=stx.returnArg(1);
            if (pid!="")
            {
                  QString user=stx.returnArg(2);
                  if (user!="")
                  {
                        process_smbd_exist* killSmbProc = new process_smbd_exist(pid,user,this);
                        connect(killSmbProc,SIGNAL(ObjError(const QString &)),this, SLOT(ObjError (const QString &)) );
                  } else sendToClient(error_command,"Missing arguments");
            } else sendToClient(error_command,"Missing arguments");
      }
}


Generated by  Doxygen 1.6.0   Back to index