Date: Sat, 19 Sep 1998 01:39:59 -0500 From: Dan Nelson <dnelson@emsphone.com> To: Daniel Berlin <dberlin@danberlin.resnet.rochester.edu>, freebsd-current@FreeBSD.ORG Subject: Re: sigh, su Message-ID: <19980919013959.A25150@emsphone.com> In-Reply-To: <Pine.linu.4.03.9809190055330.17957-100000@danberlin.resnet.rochester.edu>; from "Daniel Berlin" on Sat Sep 19 00:56:43 GMT 1998 References: <Pine.linu.4.03.9809190055330.17957-100000@danberlin.resnet.rochester.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Sep 19), Daniel Berlin said: > # su --help > Segmentation fault > > consistent too. > using 3.0-CURRENT. > > anyone else see this? > --Dan Yep. From what I can tell, the option-handling code in su.c needs a rewrite. It ends up setting user=NULL, then dying on a strcmp. Try the following patch (applies equally well to 2.2 or 3.0). I've also submitted a PR. -Dan Nelson dnelson@emsphone.com Index: su.c =================================================================== RCS file: /home/ncvs/src/usr.bin/su/su.c,v retrieving revision 1.14.2.9 diff -b -r1.14.2.9 su.c 137,138c137 < while(optind < argc) < if((ch = getopt(argc, argv, ARGSTR)) != -1) --- > while((ch = getopt(argc, argv, ARGSTR)) != -1) 166,167c165,166 < else < { --- > > if (optind < argc) 169,170d167 < break; < } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980919013959.A25150>