Date: Thu, 6 Nov 2008 04:53:02 +0000 (UTC) From: Matteo Riondato <matteo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r184706 - head/usr.sbin/cron/crontab Message-ID: <200811060453.mA64r24k045757@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: matteo Date: Thu Nov 6 04:53:02 2008 New Revision: 184706 URL: http://svn.freebsd.org/changeset/base/184706 Log: Be paranoid and zero out passwd PR: 122070 Submitted by: Steven Kreuzer <skreuzer@exit2shell.com> Reminded by: gnn@ MFC after: 3 days Modified: head/usr.sbin/cron/crontab/crontab.c Modified: head/usr.sbin/cron/crontab/crontab.c ============================================================================== --- head/usr.sbin/cron/crontab/crontab.c Thu Nov 6 04:51:09 2008 (r184705) +++ head/usr.sbin/cron/crontab/crontab.c Thu Nov 6 04:53:02 2008 (r184706) @@ -138,6 +138,7 @@ parse_args(argc, argv) if (!(pw = getpwuid(getuid()))) errx(ERROR_EXIT, "your UID isn't in the passwd file, bailing out"); + bzero(pw->pw_passwd, strlen(pw->pw_passwd)); (void) strncpy(User, pw->pw_name, (sizeof User)-1); User[(sizeof User)-1] = '\0'; strcpy(RealUser, User); @@ -154,6 +155,7 @@ parse_args(argc, argv) errx(ERROR_EXIT, "must be privileged to use -u"); if (!(pw = getpwnam(optarg))) errx(ERROR_EXIT, "user `%s' unknown", optarg); + bzero(pw->pw_passwd, strlen(pw->pw_passwd)); (void) strncpy(User, pw->pw_name, (sizeof User)-1); User[(sizeof User)-1] = '\0'; break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811060453.mA64r24k045757>