SCCS-vsn: lib/libc/gen/getlogin.c 5.10
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getlogin.c 5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)getlogin.c 5.10 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
}
return (*logname ? logname : (char *)NULL);
}
-
-char *
-cuserid(s)
- char *s;
-{
- register struct passwd *pwd;
-
- if ((pwd = getpwuid(geteuid())) == NULL) {
- if (s)
- *s = '\0';
- return (s);
- }
- if (s) {
- (void)strncpy(s, pwd->pw_name, L_cuserid);
- return (s);
- }
- return (pwd->pw_name);
-}