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:
Eric Andersen
2002-09-30 20:39:56 +00:00
parent a6f6e06107
commit 02e6ba91e8
9 changed files with 27 additions and 32 deletions

View File

@ -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 */