Print this page
4078 groupadd execs getent unnecessarily
Reviewed by: Rich Lowe <richlowe@richlowe.net>
Reviewed by: Gary Mills <gary_mills@fastmail.fm>
Reviewed by: Milan Jurik <milan.jurik@xylab.cz>
Reviewed by: Gordon Ross <Gordon.W.Ross@gmail.com>

*** 18,27 **** --- 18,28 ---- * * CDDL HEADER END */ /* * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013 RackTop Systems. */ #include <stdio.h> #include <stdlib.h> #include <strings.h>
*** 178,202 **** getsetdefval(const char *key, char *dflt) { int i; for (i = 0; i < NKEYS; i++) ! if (strcmp(keys[i].key, key) == 0) if (keys[i].newvalue != NULL) return (keys[i].newvalue); else return (keys[i].newvalue = dflt); return (NULL); } char * getusertype(char *cmdname) { static char usertype[MAX_TYPE_LENGTH]; char *cmd; ! if (cmd = strrchr(cmdname, '/')) ++cmd; else cmd = cmdname; /* get user type based on the program name */ --- 179,204 ---- getsetdefval(const char *key, char *dflt) { int i; for (i = 0; i < NKEYS; i++) ! if (strcmp(keys[i].key, key) == 0) { if (keys[i].newvalue != NULL) return (keys[i].newvalue); else return (keys[i].newvalue = dflt); + } return (NULL); } char * getusertype(char *cmdname) { static char usertype[MAX_TYPE_LENGTH]; char *cmd; ! if ((cmd = strrchr(cmdname, '/'))) ++cmd; else cmd = cmdname; /* get user type based on the program name */