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

@ -121,7 +121,7 @@ extern int logger_main(int argc, char **argv)
pri = pencode(optarg);
break;
case 't':
strncpy(name, optarg, sizeof(name));
safe_strncpy(name, optarg, sizeof(name));
break;
default:
show_usage();
@ -144,7 +144,7 @@ extern int logger_main(int argc, char **argv)
} while (c != EOF);
} else {
len = 1; /* for the '\0' */
message=xcalloc(1, 1);
message = xcalloc(1, 1);
for (i = optind; i < argc; i++) {
len += strlen(argv[i]);
len += 1; /* for the space between the args */
@ -152,7 +152,7 @@ extern int logger_main(int argc, char **argv)
strcat(message, argv[i]);
strcat(message, " ");
}
message[strlen(message)-1] = '\0';
message[strlen(message) - 2] = '\0';
syslog(pri, "%s", message);
}