diff options
author | Darren Tucker <dtucker@zip.com.au> | 2010-11-05 02:50:41 +0100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2010-11-05 02:50:41 +0100 |
commit | fd4d8aa2cbe0acad520ab168656759cb46054c03 (patch) | |
tree | 25eeb4f3ef61bbb69b8e7bf42764d86cbb47e41d /platform.c | |
parent | - (dtucker) [platform.c session.c] Move the BSDI setpgrp into platform.c. (diff) | |
download | openssh-fd4d8aa2cbe0acad520ab168656759cb46054c03.tar.xz openssh-fd4d8aa2cbe0acad520ab168656759cb46054c03.zip |
- (dtucker) [platform.c] Only call setpgrp on BSDI if running as root to
retain previous behavior.
Diffstat (limited to 'platform.c')
-rw-r--r-- | platform.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/platform.c b/platform.c index 20b478343..570f130ae 100644 --- a/platform.c +++ b/platform.c @@ -1,4 +1,4 @@ -/* $Id: platform.c,v 1.7 2010/11/05 01:45:18 dtucker Exp $ */ +/* $Id: platform.c,v 1.8 2010/11/05 01:50:41 dtucker Exp $ */ /* * Copyright (c) 2006 Darren Tucker. All rights reserved. @@ -76,7 +76,8 @@ platform_setusercontext(struct passwd *pw) #endif #if defined(HAVE_LOGIN_CAP) && defined (__bsdi__) - setpgid(0, 0); + if (getuid() == 0 || geteuid() == 0) + setpgid(0, 0); # endif } |