From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 12 Apr 2010 08:28:46 -0400 To: ebo@sandien.com, 9fans@9fans.net Message-ID: In-Reply-To: References: <46914d2c-437d-406e-a928-123f4d09f9f7@u15g2000prd.googlegroups.com> <93c7f0c907631447ddb00c5d9280f5eb@brasstown.quanstro.net> <2a514b8f79dfb3434a836f743f936bb2@brasstown.quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] /sys/lib/newuser patch Topicbox-Message-UUID: ff7af4e4-ead5-11e9-9d60-3106f5b1d025 > Following on several peoples advice and a suggested code snippet from Erik > I've added the following before the check for profile: > > if(! test -d $home){ > echo no home directory $home > exit homeless > } > if(! ls -ld $home >[2=] | grep -s '^d-rwx.* '$user){ > echo bad permissions > exit homeless > } you must also exit if ~ $user none. i'd also recommend aborting if ~ $home /. you don't want none making files in /. on a regular plan 9 system, that's no worry, but 9vx, ... - erik