From ace9589882a490991696d52206a997eb76319d23 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 4 May 1996 08:13:51 +0000 Subject: [PATCH] strdup re-generated path in pwd_mkdb; "make distribution" passwd files with proper arguments --- etc/Makefile | 2 +- usr.sbin/pwd_mkdb/pwd_mkdb.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/Makefile b/etc/Makefile index f4a58a6d632..1f63711e307 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -41,7 +41,7 @@ distribution: distrib-dirs install -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc install -c -o root -g wheel -m 600 crontab ${DESTDIR}/var/cron/tabs/root install -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc - pwd_mkdb -p -d ${DESTDIR} /etc/master.passwd + pwd_mkdb -p -d ${DESTDIR}/etc /etc/master.passwd install -c -o ${BINOWN} -g ${BINGRP} -m 555 \ MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev (cd root; \ diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.c b/usr.sbin/pwd_mkdb/pwd_mkdb.c index 8ea7cab2f4c..47c044f33e2 100644 --- a/usr.sbin/pwd_mkdb/pwd_mkdb.c +++ b/usr.sbin/pwd_mkdb/pwd_mkdb.c @@ -40,7 +40,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)pwd_mkdb.c 8.5 (Berkeley) 4/20/94";*/ -static char *rcsid = "$Id: pwd_mkdb.c,v 1.2 1996/04/23 21:55:49 deraadt Exp $"; +static char *rcsid = "$Id: pwd_mkdb.c,v 1.3 1996/05/04 08:13:54 deraadt Exp $"; #endif /* not lint */ #include @@ -140,7 +140,7 @@ main(argc, argv) /* We don't care what the user wants. */ (void)umask(0); - pname = *argv; + pname = strdup(changedir(*argv, basedir)); /* Open the original password file */ if (!(fp = fopen(pname, "r"))) error(pname); -- 2.20.1