Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!rill.news.pipex.net!pipex!tank.news.pipex.net!pipex!news.utell.co.uk!usenet
From: brian@shift.lan.awfulhak.org (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: 2.2.1 and empty-passwords
Date: 3 Apr 1997 09:43:22 GMT
Organization: Awfulhak Ltd.
Lines: 47
Message-ID: <5hvu3q$e44@ui-gate.utell.co.uk>
References: <5hovjq$b82@uriah.heep.sax.de> <zQg03MD4F99aCz4@rb.xs.use.ch>
Reply-To: brian@awfulhak.org, brian@utell.co.uk
NNTP-Posting-Host: shift.utell.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Newsreader: knews 0.9.8
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:38410
In article <zQg03MD4F99aCz4@rb.xs.use.ch>,
borki@rb.xs.use.ch (Reto Burkhalter) writes:
>>> J Wunsch
>>> 31.03.1997
>
>
>> Two people doing wrong... one with a logico, and another one who
>> dragged this logico untested onto the 2.2 branch at 23:59. :-(
>>
>> Index: /usr/src/usr.bin/login/login.c
>> ===================================================================
>> RCS file: /home/cvs/src/usr.bin/login/login.c,v
>> retrieving revision 1.12.2.2
>> retrieving revision 1.12.2.3
>> diff -u -u -r1.12.2.2 -r1.12.2.3
>> --- login.c 1997/03/25 05:26:29 1.12.2.2
>> +++ login.c 1997/03/27 10:06:43 1.12.2.3
>> @@ -268,7 +268,7 @@
>> /* already authenticated */
>> break;
>> } else if (pwd->pw_passwd[0] == '\0') {
>> - if (rootlogin && !rootok) {
>> + if (!rootlogin || rootok) {
>> /* pretend password okay */
>> rval = 0;
>> goto ttycheck;
>>
>
> I'm not a C freak... What I'm going to do with this? Change
> the two lines (the ones with the + and -)?
>
>
> Reto
You guessed it. There's a program called "patch" that takes this
format of data (output of "diff -c") from stdin and "patches"
the files (according to the login.c lines at the start).
So you'd say
cd /usr/src/usr.bin/login
patch <patchfile
--
Brian <brian@awfulhak.org> <brian@freebsd.org>
<http://www.awfulhak.demon.co.uk>
Don't _EVER_ lose your sense of humour !