Source-Changes-HG archive

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

[src/trunk]: src/lib/libutil Make setusercontext() resilient against missing ...



details:   https://anonhg.NetBSD.org/src/rev/f1e46d127bdb
branches:  trunk
changeset: 480494:f1e46d127bdb
user:      mjl <mjl%NetBSD.org@localhost>
date:      Fri Jan 14 02:14:42 2000 +0000

description:
Make setusercontext() resilient against missing login.conf too.

diffstat:

 lib/libutil/login_cap.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r d291fa64ae48 -r f1e46d127bdb lib/libutil/login_cap.c
--- a/lib/libutil/login_cap.c   Fri Jan 14 02:11:54 2000 +0000
+++ b/lib/libutil/login_cap.c   Fri Jan 14 02:14:42 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: login_cap.c,v 1.2 2000/01/13 06:48:14 mjl Exp $ */
+/* $NetBSD: login_cap.c,v 1.3 2000/01/14 02:14:42 mjl Exp $ */
 
 /*-
  * Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved.
@@ -462,8 +462,8 @@
 
        flc = NULL;
 
-       if (!lc && !(flc = lc = login_getclass(pwd ? pwd->pw_class : NULL)))
-               return (-1);
+       if (!lc)
+               flc = lc = login_getclass(pwd ? pwd->pw_class : NULL);
 
        /*
         * Without the pwd entry being passed we cannot set either



Home | Main Index | Thread Index | Old Index