Fix from Matt Kraai -- a better way to NULL terminate strings for the
my_* passwd and group routines. I should have thought of doing it this way...
This commit is contained in:
parent
77508b29fa
commit
bd193a42a5
13 changed files with 26 additions and 50 deletions
|
@ -25,13 +25,13 @@
|
|||
|
||||
extern int logname_main(int argc, char **argv)
|
||||
{
|
||||
char *user = xmalloc(9);
|
||||
char user[9];
|
||||
|
||||
if (argc > 1)
|
||||
usage(logname_usage);
|
||||
|
||||
my_getpwuid(user, geteuid());
|
||||
if (user) {
|
||||
if (*user) {
|
||||
puts(user);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue