Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/blacklist/bin Merge the uid data too, so that w...



details:   https://anonhg.NetBSD.org/src/rev/df531d8b578d
branches:  trunk
changeset: 808642:df531d8b578d
user:      christos <christos%NetBSD.org@localhost>
date:      Wed May 27 22:39:01 2015 +0000

description:
Merge the uid data too, so that we don't end up with multiple entries
when we don't care about the uid in the config file. In this case sshd
returns either uid=root|sshd depending on how we failed, so we used to
get two entries.

diffstat:

 external/bsd/blacklist/bin/conf.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 5b23845bf87e -r df531d8b578d external/bsd/blacklist/bin/conf.c
--- a/external/bsd/blacklist/bin/conf.c Wed May 27 22:37:37 2015 +0000
+++ b/external/bsd/blacklist/bin/conf.c Wed May 27 22:39:01 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.c,v 1.18 2015/01/28 00:42:15 christos Exp $       */
+/*     $NetBSD: conf.c,v 1.19 2015/05/27 22:39:01 christos Exp $       */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: conf.c,v 1.18 2015/01/28 00:42:15 christos Exp $");
+__RCSID("$NetBSD: conf.c,v 1.19 2015/05/27 22:39:01 christos Exp $");
 
 #include <stdio.h>
 #include <string.h>
@@ -882,6 +882,7 @@
                    conf_print(buf, sizeof(buf), "to:\t", "", c));
        }
        memcpy(c->c_name, sc->c_name, CONFNAMESZ);
+       c->c_uid = sc->c_uid;
        c->c_rmask = sc->c_rmask;
        c->c_nfail = sc->c_nfail;
        c->c_duration = sc->c_duration;
@@ -908,6 +909,8 @@
        
        if (sc->c_name[0])
                memcpy(c->c_name, sc->c_name, CONFNAMESZ);
+       if (sc->c_uid != -2)
+               c->c_uid = sc->c_uid;
        if (sc->c_rmask != -2)
                c->c_lmask = c->c_rmask = sc->c_rmask;
        if (sc->c_nfail != -2)



Home | Main Index | Thread Index | Old Index