From: Apple Date: Fri, 12 Jan 2007 02:05:03 +0000 (+0000) Subject: system_cmds-336.20.tar.gz X-Git-Tag: mac-os-x-10410x86^0 X-Git-Url: https://git.saurik.com/apple/system_cmds.git/commitdiff_plain/2d82beddde077a4712a8e0b53ffca3365c4d9487?ds=inline system_cmds-336.20.tar.gz --- diff --git a/atrun.tproj/atrun.c b/atrun.tproj/atrun.c index 9d52ffa..4eac2cc 100644 --- a/atrun.tproj/atrun.c +++ b/atrun.tproj/atrun.c @@ -55,11 +55,7 @@ static const char rcsid[] = #include #endif -#if (MAXLOGNAME-1) > UT_NAMESIZE -#define LOGNAMESIZE UT_NAMESIZE -#else #define LOGNAMESIZE (MAXLOGNAME-1) -#endif /* Local headers */ @@ -119,7 +115,8 @@ run_file(const char *filename, uid_t uid, gid_t gid) pid_t pid; int fd_out, fd_in; int queue; - char mailbuf[LOGNAMESIZE + 1], fmt[49]; + char mailbuf[LOGNAMESIZE + 1]; + char *fmt = NULL; char *mailname = NULL; FILE *stream; int send_mail = 0; @@ -208,13 +205,15 @@ run_file(const char *filename, uid_t uid, gid_t gid) fcntl(fd_in, F_SETFD, fflags & ~FD_CLOEXEC); - snprintf(fmt, sizeof(fmt), - "#!/bin/sh\n# atrun uid=%%ld gid=%%ld\n# mail %%%ds %%d", - LOGNAMESIZE); + asprintf(&fmt, "%s%d%s", + "#!/bin/sh\n# atrun uid=%ld gid=%ld\n# mail %", + LOGNAMESIZE, + "s %d"); if (fscanf(stream, fmt, &nuid, &ngid, mailbuf, &send_mail) != 4) { syslog(LOG_ERR,"File %s is in wrong format - aborting", filename); exit(EXIT_FAILURE); } + free(fmt); if (mailbuf[0] == '-') { syslog(LOG_ERR,"illegal mail name %s in %s",mailbuf,filename); exit(EXIT_FAILURE); diff --git a/zic.tproj/datfiles/tzdata2006a.tar.gz b/zic.tproj/datfiles/tzdata2006a.tar.gz deleted file mode 100644 index 3e4e878..0000000 Binary files a/zic.tproj/datfiles/tzdata2006a.tar.gz and /dev/null differ diff --git a/zic.tproj/datfiles/tzdata2007a.tar.gz b/zic.tproj/datfiles/tzdata2007a.tar.gz new file mode 100644 index 0000000..b242def Binary files /dev/null and b/zic.tproj/datfiles/tzdata2007a.tar.gz differ