[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tiger-devel] [PATCH] Minor update to acc014f message.
From: |
Javier Fernandez-Sanguino |
Subject: |
Re: [Tiger-devel] [PATCH] Minor update to acc014f message. |
Date: |
Tue, 01 Jul 2003 12:31:48 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 |
Ryan Bradetich wrote:
Hello all,
This patch does the following:
* Add the Login ID for the UID-0 account that has / for the home
directory.
Good.
* replaced $uid and $homedir with hardcoded values 0 and / since it the
only way this message is called is if those are true.
I wouldn't change that. Now that I reread the code it does not make much
sense to restrict the uid. No user should have as home directory '/'
should it?
Also, changing it does simplify the code but makes it difficult to copy
& paste if we want a new check (with different UID/homedir but similar
meesage).
In any case, it maybe should be:
# Check for user's home directory, warn if it's / and if it's root
# then fail
if [ "$homedir" = "/" ] ; then
if [ "$uid" = 0 ] ; then
message FAIL acc014f '' "Login ID $user (UID-$uid) has $homedir
for their home directory"
else
message WARN acc01Xw '' "Login ID $user (UID-$uid) has $homedir for
their home directory"
fi
fi
This message could be easily copy & pasted if we wanted to check, say
/var/www in the future for users =/= www (let's say it's uid 100). Sample:
[ "$uid" != 100 -a "$homedir" = "/var/www" ] &&
message FAIL acc0XXf '' "Login ID $user (UID-$uid) has $homedir
for their home directory"
Don't you think?
Javi