|
Lines 1466-1474
do_setusercontext(struct passwd *pw)
Link Here
|
| 1466 |
if (getuid() == 0 || geteuid() == 0) |
1466 |
if (getuid() == 0 || geteuid() == 0) |
| 1467 |
#endif /* HAVE_CYGWIN */ |
1467 |
#endif /* HAVE_CYGWIN */ |
| 1468 |
{ |
1468 |
{ |
| 1469 |
|
|
|
| 1470 |
#ifdef HAVE_SETPCRED |
1469 |
#ifdef HAVE_SETPCRED |
| 1471 |
if (setpcred(pw->pw_name, (char **)NULL) == -1) |
1470 |
/* set all creds except real user ID */ |
|
|
1471 |
char *creds[] = { "REAL_USER=root", NULL }; |
| 1472 |
|
| 1473 |
if (setpcred(pw->pw_name, creds) == -1) |
| 1472 |
fatal("Failed to set process credentials"); |
1474 |
fatal("Failed to set process credentials"); |
| 1473 |
#endif /* HAVE_SETPCRED */ |
1475 |
#endif /* HAVE_SETPCRED */ |
| 1474 |
#ifdef HAVE_LOGIN_CAP |
1476 |
#ifdef HAVE_LOGIN_CAP |