Path: utzoo!utstat!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!lavaca.uh.edu!uhnix1!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: news.software.b Subject: Re: Passing on unwanted groups Message-ID: Date: 18 Aug 90 17:12:15 GMT References: <1990Aug15.164651.26664@zoo.toronto.edu> <49281@olivea.atc.olivetti.com> <1990Aug16.163107.1166@zoo.toronto.edu> <49289@olivea.atc.olivetti.com> <1990Aug17.155959.1331@zoo.toronto.edu> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 27 In article <1990Aug17.155959.1331@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes: > In article <49289@olivea.atc.olivetti.com> jerry@olivey.olivetti.com (Jerry Aguirre) writes: > >... the stressed out sysadmin is probably going to run the expire > >or rebuild as root. If he is running C news then the ownerships will > >be wrong and stress will turn to panic. The damn tools should at least > >abort if they are not being run as the news owner. > How? It is not easy to tell. Huh? It's hard to determine the login name, but it's easy enough to determine if you've got the same user ID as a known login (such as the news owner). > In particular, it is *very* difficult to > reliably determine the login name or user id from the shell in a portable > way. Sounds like a job for a portable custom C program. Doing a "getpwnam" on the news owner and then comparing "pw_uid" with "getuid" should be completely portable. Or do what I do, chown all the files after creating them. > There is also a difference between deliberately confronting people with > unfamiliar conventions, and expecting them to remember familiar ones > ("the files belong to whoever you were when you created them"). Unfamiliar conventions like "root can do everything"? -- Peter da Silva. `-_-' +1 713 274 5180. 'U` peter@ferranti.com (currently not working) peter@hackercorp.com