🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #10279

Re: Tightening security on SunOS 4.0 'fastfind' (pa

#10279
From: Rene' Seindal
Date: Sat, 14 Jan 1989 04:47
47 lines
2198 bytes
rwl@uvacs.cs.virginia.edu (Ray Lubinsky) writes:

> It's very much worth your while to run /usr/lib/find/updatedb nightly via
> cron, but the cautious administrator will want to prevent user directories
> from being added to the database.  Otherwise, even protected directories
> and their member file objects will be added to the database for all to
> see.

The following patch to find will only allow users to see the files to
which they have search permission.  Of course the database is still there,
readable and all, so people could read it directly.  I you are that
paranoid, make find setgid to daemon, and allow only group daemon access
to the database.  this wouldn't harm updatedb, since it is run as root.

Rene' Seindal (seindal@diku.dk).
__________

*** /tmp/,RCSt1a07350	Tue Jan 10 17:06:04 1989
--- /tmp/,RCSt2a07350	Tue Jan 10 17:06:06 1989
***************
*** 863,868 ****
--- 863,869 ----
  	char path[1024];
  	char bigram1[128], bigram2[128];
  	int found = NO;
+ 	struct stat statb;

  	if ( (fp = fopen ( FCODES, "r" )) == NULL ) {
  		fprintf ( stderr, "find: can't open %s\n", FCODES );
***************
*** 898,904 ****
  				if ( *p == NULL ) {	/* success on fast match */
  					found = YES;
  					if ( globflag == NO || amatch ( path, pathpart ) )
! 						puts ( path );
  					break;
  				}
  			}
--- 899,906 ----
  				if ( *p == NULL ) {	/* success on fast match */
  					found = YES;
  					if ( globflag == NO || amatch ( path, pathpart ) )
! 						if (stat(path, &statb) == 0)
! 							puts ( path );
  					break;
  				}
  			}
Technical Details
Message-ID: <4345@freja.diku.dk>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!cornell!uw-beaver!rice!sun-spots-request
References: <12397@silica.BBN.COM> <2894@uvacs.cs.Virginia.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!cornell!uw-beaver!rice!sun-spots-request
From: mcvax!sleipner.diku.dk!seindal@uunet.uu.net (Rene' Seindal)
Newsgroups: comp.sys.sun
Subject: Re: Tightening security on SunOS 4.0 'fastfind' (pa
Message-ID: <4345@freja.diku.dk>
Date: 14 Jan 89 04:47:40 GMT
References: <12397@silica.BBN.COM> <2894@uvacs.cs.Virginia.EDU>
Sender: usenet@rice.edu
Organization: Interleaf Inc, Cambridge, MA
Lines: 47
Approved: Sun-Spots@rice.edu
Original-Date: 10 Jan 89 16:10:59 GMT
X-Sun-Spots-Digest: Volume 7, Issue 103, message 7 of 11