From owner-freebsd-security Thu Jan 3 21:25:55 2002 Delivered-To: freebsd-security@freebsd.org Received: from squeaky.robbins.dropbear.id.au (048.a.009.mel.iprimus.net.au [210.50.112.48]) by hub.freebsd.org (Postfix) with ESMTP id 5646837B417 for ; Thu, 3 Jan 2002 21:25:49 -0800 (PST) Received: (from tim@localhost) by squeaky.robbins.dropbear.id.au (8.11.6/8.11.6) id g045pNn14746 for freebsd-security@FreeBSD.ORG; Fri, 4 Jan 2002 16:51:23 +1100 (EST) (envelope-from tim) Date: Fri, 4 Jan 2002 16:51:19 +1100 From: "Tim J. Robbins" To: freebsd-security@FreeBSD.ORG Subject: Re: nologin hole? Message-ID: <20020104165117.A14133@squeaky.robbins.dropbear.id.au> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from podkorytov@mail.ru on Fri, Jan 04, 2002 at 07:18:55AM +0300 Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, Jan 04, 2002 at 07:18:55AM +0300, ??????? ?????????? wrote: > 1. In case of breaking this script user has root access to system. (See man > sh, key -p ) The -p option doesn't magically grant root privileges. It simply tells the shell not to use environment variables and ~/.profile. > PS:on FreeBSD v.4.1 ps -x not viewed programms, thats > running code function Exit(), called from atexit(Exit). > It Bug ? I used top command for view PID NoLogin. I can't reproduce this on -CURRENT. What I can't figure out is why /sbin/nologin is a shell script at all, and not something like this: #include #include int main (void) { #define MSG "This account is currently not available.\n" write (STDERR_FILENO, MSG, sizeof(MSG) - 1); exit (EX_UNAVAILABLE); } It seems wasteful and possibly dangerous to start a shell. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message