Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/passwd it doesn't make any sense to use -u with -r o...



details:   https://anonhg.NetBSD.org/src/rev/b4a660f1e18c
branches:  trunk
changeset: 475810:b4a660f1e18c
user:      marc <marc%NetBSD.org@localhost>
date:      Thu Aug 26 07:33:16 1999 +0000

description:
it doesn't make any sense to use -u with -r or -i, so don't permit it.

diffstat:

 usr.bin/passwd/passwd.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 75e641db1905 -r b4a660f1e18c usr.bin/passwd/passwd.c
--- a/usr.bin/passwd/passwd.c   Thu Aug 26 07:18:10 1999 +0000
+++ b/usr.bin/passwd/passwd.c   Thu Aug 26 07:33:16 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: passwd.c,v 1.13 1998/07/11 15:55:48 mrg Exp $  */
+/*     $NetBSD: passwd.c,v 1.14 1999/08/26 07:33:16 marc Exp $ */
 
 /*
  * Copyright (c) 1988, 1993, 1994
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "from: @(#)passwd.c    8.3 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: passwd.c,v 1.13 1998/07/11 15:55:48 mrg Exp $");
+__RCSID("$NetBSD: passwd.c,v 1.14 1999/08/26 07:33:16 marc Exp $");
 #endif
 #endif /* not lint */
 
@@ -183,6 +183,9 @@
        }
 
 #if defined(KERBEROS) || defined(KERBEROS5)
+       if (uflag && (iflag || rflag))
+               errx(1, "-u cannot be used with -r or -i");
+
        if (use_kerberos)
                exit(kadm_passwd(username, iflag, rflag, uflag));
 #else



Home | Main Index | Thread Index | Old Index