diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | platform.c | 5 |
2 files changed, 5 insertions, 2 deletions
@@ -29,6 +29,8 @@ | |||
29 | - (dtucker) [platform.c session.c] Move the AIX setpcred+chroot hack into | 29 | - (dtucker) [platform.c session.c] Move the AIX setpcred+chroot hack into |
30 | platform.c | 30 | platform.c |
31 | - (dtucker) [platform.c session.c] Move the BSDI setpgrp into platform.c. | 31 | - (dtucker) [platform.c session.c] Move the BSDI setpgrp into platform.c. |
32 | - (dtucker) [platform.c] Only call setpgrp on BSDI if running as root to | ||
33 | retain previous behavior. | ||
32 | 34 | ||
33 | 20101025 | 35 | 20101025 |
34 | - (tim) [openbsd-compat/glob.h] Remove sys/cdefs.h include that came with | 36 | - (tim) [openbsd-compat/glob.h] Remove sys/cdefs.h include that came with |
diff --git a/platform.c b/platform.c index 20b478343..570f130ae 100644 --- a/platform.c +++ b/platform.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: platform.c,v 1.7 2010/11/05 01:45:18 dtucker Exp $ */ | 1 | /* $Id: platform.c,v 1.8 2010/11/05 01:50:41 dtucker Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2006 Darren Tucker. All rights reserved. | 4 | * Copyright (c) 2006 Darren Tucker. All rights reserved. |
@@ -76,7 +76,8 @@ platform_setusercontext(struct passwd *pw) | |||
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #if defined(HAVE_LOGIN_CAP) && defined (__bsdi__) | 78 | #if defined(HAVE_LOGIN_CAP) && defined (__bsdi__) |
79 | setpgid(0, 0); | 79 | if (getuid() == 0 || geteuid() == 0) |
80 | setpgid(0, 0); | ||
80 | # endif | 81 | # endif |
81 | } | 82 | } |
82 | 83 | ||