Subversion Repositories public

Rev

Rev 55 | Rev 63 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 55 Rev 61
Line 209... Line 209...
209
  if (pd.pid == 0) {
209
  if (pd.pid == 0) {
210
   
210
   
211
    struct passwd* pwd = getpwnam(m_user.c_str());
211
    struct passwd* pwd = getpwnam(m_user.c_str());
212
    if (    pwd == NULL                 // user not found
212
    if (    pwd == NULL                 // user not found
213
        ||  setuid(pwd->pw_uid) != 0    // setting UID failed
213
        ||  setuid(pwd->pw_uid) != 0    // setting UID failed
-
 
214
        ||  setgid(pwd->pw_gid) != 0    // setting GID failed
214
        ||  execvp(argv[0], argv) != 0) // exec failed
215
        ||  execvp(argv[0], argv) != 0) // exec failed
215
    {
216
    {
216
      _exit(1);
217
      _exit(1);
217
    }
218
    }
218
  }
219
  }