Vodz' last_patch57:
Hi, Erik. my_getpw(uid/gid) and applets used it have problem: if username for uid not found, applets can`t detect it (but code pessent). Also "%8ld " format is bad: spaces not required (applets have self format or spec format (tar applet) and overflow for "id" applet...) This problem also pressent in stable version. Patch for unstable in attach. --w vodz
This commit is contained in:
@ -244,12 +244,10 @@ static inline int writeTarHeader(struct TarBallInfo *tbInfo,
|
||||
TAR_MAGIC_LEN + TAR_VERSION_LEN);
|
||||
|
||||
/* Enter the user and group names (default to root if it fails) */
|
||||
my_getpwuid(header.uname, statbuf->st_uid);
|
||||
if (!*header.uname)
|
||||
strcpy(header.uname, "root");
|
||||
my_getgrgid(header.gname, statbuf->st_gid);
|
||||
if (!*header.uname)
|
||||
if (my_getpwuid(header.uname, statbuf->st_uid) == NULL)
|
||||
strcpy(header.uname, "root");
|
||||
if (my_getgrgid(header.gname, statbuf->st_gid) == NULL)
|
||||
strcpy(header.gname, "root");
|
||||
|
||||
if (tbInfo->hlInfo) {
|
||||
/* This is a hard link */
|
||||
|
Reference in New Issue
Block a user