Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Aug 2012 12:19:05 +0000 (UTC)
From:      Gavin Atkinson <gavin@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r39478 - head/en_US.ISO8859-1/htdocs/internal
Message-ID:  <201208311219.q7VCJ5q4028970@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gavin
Date: Fri Aug 31 12:19:04 2012
New Revision: 39478
URL: http://svn.freebsd.org/changeset/doc/39478

Log:
  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)

Modified:
  head/en_US.ISO8859-1/htdocs/internal/homepage.pl

Modified: head/en_US.ISO8859-1/htdocs/internal/homepage.pl
==============================================================================
--- head/en_US.ISO8859-1/htdocs/internal/homepage.pl	Fri Aug 31 09:24:58 2012	(r39477)
+++ head/en_US.ISO8859-1/htdocs/internal/homepage.pl	Fri Aug 31 12:19:04 2012	(r39478)
@@ -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)$%;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208311219.q7VCJ5q4028970>