diff options
author | Gavin Atkinson <gavin@FreeBSD.org> | 2012-08-31 12:19:04 +0000 |
---|---|---|
committer | Gavin Atkinson <gavin@FreeBSD.org> | 2012-08-31 12:19:04 +0000 |
commit | ebd1077a368e11979d7ab3900d3ff2d4fc4a04ee (patch) | |
tree | 191bbf4cee67bb77b51d82a447d81894dc23e826 | |
parent | 6caae5c6024bf609c6eb01f88f5f7a06a1a1acce (diff) | |
download | doc-ebd1077a368e11979d7ab3900d3ff2d4fc4a04ee.tar.gz doc-ebd1077a368e11979d7ab3900d3ff2d4fc4a04ee.zip |
Change the script to generate the list of personal homepages away from
using "ypcat passwd" and towards "getent passwd". With work taking place
on the FreeBSD cluster, the former will eventually start failing.
While here, increase the lowest UID we care about from 100 to 500.
In reality, daemons may get any user ID below 1000, but the FreeBSD
cluster has some longstanding users with IDs in the 500s. At the
very least, this change is no less wrong than the existing code.
Approved by: bcr (mentor)
Notes
Notes:
svn path=/head/; revision=39478
-rw-r--r-- | en_US.ISO8859-1/htdocs/internal/homepage.pl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/en_US.ISO8859-1/htdocs/internal/homepage.pl b/en_US.ISO8859-1/htdocs/internal/homepage.pl index 6bf4f88b38..957f06d38e 100644 --- a/en_US.ISO8859-1/htdocs/internal/homepage.pl +++ b/en_US.ISO8859-1/htdocs/internal/homepage.pl @@ -1,11 +1,12 @@ #!/usr/bin/perl -$passwd = '/etc/passwd'; +# $FreeBSD$ + $homepagedir = 'public_html'; @index = ('index.html', 'index.cgi'); $noindex = '.noindex'; -open(P, 'ypcat passwd |') || die "open $passwd: $!\n"; +open(P, 'getent passwd |') || die "getent passwd: $!\n"; undef @pages; while(<P>) { ($login,$password,$uid,$gid,$gcos,$home,$shell) = split(/:/); @@ -14,7 +15,7 @@ while(<P>) { $gcos =~ s/,.*//; # disable daemons - next if $uid <= 100; + next if $uid < 500; next if $login eq 'nobody'; next if $shell =~ ~ m%/(pppd|sliplogin|nologin|nonexistent)$%; |