]> granicus.if.org Git - shadow/commitdiff
subordinateio: Fix subordinate_parse to have an internal static buffer
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 6 Jun 2013 15:42:36 +0000 (17:42 +0200)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 5 Aug 2013 15:08:45 +0000 (10:08 -0500)
subordinate_parse is supposed to return a static structure that
represents one line in /etc/subuid or /etc/subgid.  I goofed and
failed to make the variable rangebuf that holds the username of
in the returned structure static.

Add this missing static specification.

Author: <Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
lib/subordinateio.c

index 851cfa05901313d6af6190f7f8b4e56935bc6c3f..4cca9925b9e4423aede5c692e3e21d59d8cc98e5 100644 (file)
@@ -48,7 +48,7 @@ static void subordinate_free (/*@out@*/ /*@only@*/void *ent)
 static void *subordinate_parse (const char *line)
 {
        static struct subordinate_range range;
-       char rangebuf[1024];
+       static char rangebuf[1024];
        int i;
        char *cp;
        char *fields[NFIELDS];