Print this page
2989 Eliminate use of LOGNAME_MAX in ON
1166 useradd have warning with name more 8 chars

*** 18,33 **** * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - #pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/task.h> #include <alloca.h> #include <libproc.h> --- 18,33 ---- * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* + * Copyright (c) 2013 Gary Mills + * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #include <sys/types.h> #include <sys/task.h> #include <alloca.h> #include <libproc.h>
*** 694,704 **** * allow this. */ if (projname == NULL || getuid() == (uid_t)0) return (pw); ! (void) strcpy(username, pw->pw_name); if (inproj(username, projname, prbuf, PROJECT_BUFSZ) == 0) { char **u; tmp_name = NULL; --- 694,705 ---- * allow this. */ if (projname == NULL || getuid() == (uid_t)0) return (pw); ! (void) strncpy(username, pw->pw_name, sizeof (username) - 1); ! username[sizeof (username) - 1] = '\0'; if (inproj(username, projname, prbuf, PROJECT_BUFSZ) == 0) { char **u; tmp_name = NULL;