diff options
| author | dsl <dsl@NetBSD.org> | 2003-03-03 19:05:09 +0000 |
|---|---|---|
| committer | dsl <dsl@NetBSD.org> | 2003-03-03 19:05:09 +0000 |
| commit | 0e023253c0cb0f9a6cfa00a598881b694ce86c46 (patch) | |
| tree | 983e9c9bc51961b1a107e79493d76a0b9c5bcb04 /libexec | |
| parent | 41880aca75b4c62c85d2fa4c436e000f7e3d22a8 (diff) | |
Call setsid so we get our own logname.
(approved by christos)
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/uucpd/uucpd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/uucpd/uucpd.c b/libexec/uucpd/uucpd.c index 5b2e20a40d5..9c407a92fc6 100644 --- a/libexec/uucpd/uucpd.c +++ b/libexec/uucpd/uucpd.c @@ -1,4 +1,4 @@ -/* $NetBSD: uucpd.c,v 1.19 2002/12/06 02:03:18 thorpej Exp $ */ +/* $NetBSD: uucpd.c,v 1.20 2003/03/03 19:05:09 dsl Exp $ */ /* * Copyright (c) 1985 The Regents of the University of California. @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985 The Regents of the University of California #if 0 static char sccsid[] = "from: @(#)uucpd.c 5.10 (Berkeley) 2/26/91"; #else -__RCSID("$NetBSD: uucpd.c,v 1.19 2002/12/06 02:03:18 thorpej Exp $"); +__RCSID("$NetBSD: uucpd.c,v 1.20 2003/03/03 19:05:09 dsl Exp $"); #endif #endif /* not lint */ @@ -203,6 +203,7 @@ doit(sa) if (initgroups(pw->pw_name, pw->pw_gid) < 0 || setgid(pw->pw_gid) < 0 || chdir(pw->pw_dir) < 0 || + setsid() < 0 || setlogin(user) < 0 || setuid(pw->pw_uid) < 0) { fprintf(stderr, "Could not set permissions.\n"); |
