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
|
@ -957,12 +957,14 @@ long my_getgrnam(char *name)
|
|||
/* gets a username given a uid */
|
||||
void my_getpwuid(char *name, long uid)
|
||||
{
|
||||
name[0] = '\0';
|
||||
my_getid("/etc/passwd", name, uid, NULL);
|
||||
}
|
||||
|
||||
/* gets a groupname given a gid */
|
||||
void my_getgrgid(char *group, long gid)
|
||||
{
|
||||
group[0] = '\0';
|
||||
my_getid("/etc/group", group, gid, NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue