Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/cron/dist calling setlogin() once is good enough.



details:   https://anonhg.NetBSD.org/src/rev/dfda744e7bbb
branches:  trunk
changeset: 767363:dfda744e7bbb
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jul 17 01:14:25 2011 +0000

description:
calling setlogin() once is good enough.

diffstat:

 external/bsd/cron/dist/do_command.c |  6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diffs (27 lines):

diff -r 8c8256549d86 -r dfda744e7bbb external/bsd/cron/dist/do_command.c
--- a/external/bsd/cron/dist/do_command.c       Sun Jul 17 01:13:22 2011 +0000
+++ b/external/bsd/cron/dist/do_command.c       Sun Jul 17 01:14:25 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: do_command.c,v 1.2 2010/05/06 18:53:17 christos Exp $  */
+/*     $NetBSD: do_command.c,v 1.3 2011/07/17 01:14:25 christos Exp $  */
 
 /* Copyright 1988,1990,1993,1994 by Paul Vixie
  * All rights reserved
@@ -25,7 +25,7 @@
 #if 0
 static char rcsid[] = "Id: do_command.c,v 1.9 2004/01/23 18:56:42 vixie Exp";
 #else
-__RCSID("$NetBSD: do_command.c,v 1.2 2010/05/06 18:53:17 christos Exp $");
+__RCSID("$NetBSD: do_command.c,v 1.3 2011/07/17 01:14:25 christos Exp $");
 #endif
 #endif
 
@@ -255,8 +255,6 @@
                        syslog(LOG_ERR, "setlogin() failure: %m");
                        _exit(ERROR_EXIT);
                }
-
-               setlogin(usernm);
 #endif /* BSD */
                if (setuid(e->pwd->pw_uid) != 0) {
                        syslog(LOG_ERR, "setuid failed");



Home | Main Index | Thread Index | Old Index