From aed09f5ace39037a98593bdc06f53ac39cee17d2 Mon Sep 17 00:00:00 2001 From: Frederic Lepied Date: Sat, 28 Feb 2004 12:25:27 +0000 Subject: use getpwuid instead of directly parsing passwd to support NIS --- rpmbuildupdate | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rpmbuildupdate') diff --git a/rpmbuildupdate b/rpmbuildupdate index a75a2b9..805504b 100755 --- a/rpmbuildupdate +++ b/rpmbuildupdate @@ -112,8 +112,8 @@ sub build if(/\%changelog/) { my $email; - $email = $ENV{EMAIL} || - qx[awk -F: '/$ENV{USER}/{print \$5}' /etc/passwd|tr -d '\n']." <$ENV{USER}\@mandrakesoft.com> "; + my @l = getpwuid($<); + $email = $ENV{EMAIL} || $l[6]." <$l[0]\@mandrakesoft.com> "; $spec .= "* ".qx[LC_TIME=C date '+%a %b %d %Y'|tr -d '\n']." ".$email. " ".$newversion."-".$config{release}."\n"; $spec .= "- New release $newversion\n\n"; @@ -294,7 +294,7 @@ sub usage { print "rpmbuildupdate v0.3 helps you build up to date RPMs.\n\n"; print "By Julien Danjou \n"; - print "Copyright (c) 2003 by MandrakeSoft.\n"; + print "Copyright (c) 2003-2004 by MandrakeSoft.\n"; print "This is free software under the GPL License.\n"; print "Usage: rpmbuildupdate [options] [pkg] [newversion]\n\n"; -- cgit v1.2.1