Return to BSD News archive
Newsgroups: comp.os.386bsd.bugs Path: sserve!newshost.anu.edu.au!munnari.oz.au!uunet!elroy.jpl.nasa.gov!ames!sun-barr!sh.wide!wnoc-tyo-news!news.u-tokyo.ac.jp!s.u-tokyo!ismspc6!maruyama From: maruyama@sunnm.ism.ac.jp (MARUYAMA Naomasa) Subject: Strange behavier on #! interpretation (Secure SUID scripts) References: <1vjtib$725@lucy.ee.und.ac.za> Date: Mon, 21 Jun 1993 03:17:14 GMT Nntp-Posting-Host: sunnm Reply-To: maruyama@ism.ac.jp Organization: The Inst. of Statistical Mathematics, Tokyo Japan Sender: news@ism.ac.jp In-Reply-To: barrett@lucy.ee.und.ac.za's message of 15 Jun 1993 09:26:03 +0200 Message-ID: <MARUYAMA.93Jun21121714@sunnm.ism.ac.jp> Lines: 62 In article <1vjtib$725@lucy.ee.und.ac.za> barrett@lucy.ee.und.ac.za (Alan Barrett) writes: >I recommend Maarten Litmaath's "indir" wrapper, available from all good >comp.sources.unix archives. indir is a small SUID root program, and But it doesn't work on 386BSD patch 0.2.3! It always results the following message. indir: -[ugbn] option expected The reason for this may be found by the following tests. Let "listarg" be the following C program: main(argc, argv) int argc; char **argv; { int i; printf("Test\n"); printf("%d\n",argc); for (i=0;i<argc; i++) { printf("%s\n", argv[i]);} } Then the script (which I named it t1) #!/home/maruyama/listarg foo bar produces no output! But if I change the name of the executable to "a.out", then the script (which I named it t2) #!/home/maruyama/a.out foo bar produces the output Test 2 /home.maruyama/a.out t2 Moreover, the next script (which I named t3) #!/home/maruyama/listarg prduces Test 2 /home/maruyama/listarg t3 Hummmmmmmmmm. 1993年06月21日(月) -------- 丸山彫苳殺苳算@統計数理研瘢雹究所 maruyama@ism.ac.jp -- 1993年06月21日(月) -------- 丸山彫苳殺苳算@統計数理研瘢雹究所 maruyama@ism.ac.jp