call setprogname(), from Anon Ymous

This commit is contained in:
christos 2008-04-05 15:59:39 +00:00
parent f4e066c173
commit 327d0b0912
3 changed files with 8 additions and 5 deletions

View File

@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: newgrp.c,v 1.4 2007/10/17 21:07:49 christos Exp $");
__RCSID("$NetBSD: newgrp.c,v 1.5 2008/04/05 15:59:39 christos Exp $");
#endif /* not lint */
#include <sys/param.h>
@ -89,6 +89,7 @@ main(int argc, char *argv[])
errx(EXIT_FAILURE, "%s: unknown login class", pwd->pw_class);
#endif
(void)setprogname(argv[0]);
lflag = 0;
while ((c = getopt(argc, argv, "-l")) != -1) {
switch (c) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: su.c,v 1.66 2007/10/17 21:05:39 christos Exp $ */
/* $NetBSD: su.c,v 1.67 2008/04/05 15:59:39 christos Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -40,7 +40,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)su.c 8.3 (Berkeley) 4/2/94";*/
#else
__RCSID("$NetBSD: su.c,v 1.66 2007/10/17 21:05:39 christos Exp $");
__RCSID("$NetBSD: su.c,v 1.67 2008/04/05 15:59:39 christos Exp $");
#endif
#endif /* not lint */
@ -123,6 +123,7 @@ main(int argc, char **argv)
char *gname;
#endif
(void)setprogname(argv[0]);
asme = asthem = fastlogin = 0;
gohome = 1;
shell = class = NULL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: su_pam.c,v 1.13 2007/10/17 21:05:39 christos Exp $ */
/* $NetBSD: su_pam.c,v 1.14 2008/04/05 15:59:39 christos Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -40,7 +40,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)su.c 8.3 (Berkeley) 4/2/94";*/
#else
__RCSID("$NetBSD: su_pam.c,v 1.13 2007/10/17 21:05:39 christos Exp $");
__RCSID("$NetBSD: su_pam.c,v 1.14 2008/04/05 15:59:39 christos Exp $");
#endif
#endif /* not lint */
@ -115,6 +115,7 @@ main(int argc, char **argv)
char *gname;
#endif
(void)setprogname(argv[0]);
asme = asthem = fastlogin = 0;
gohome = 1;
shell = class = NULL;