[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tiger-devel] [PATCH] Define MESG for HP-UX and fix /etc/ftpusers c
Re: [Tiger-devel] [PATCH] Define MESG for HP-UX and fix /etc/ftpusers check
Thu, 26 Jun 2003 10:25:42 +0200
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01
Ryan Bradetich wrote:
This patch does the following:
* Define MESG for HP-UX
* Fix the /etc/ftpusers check
The /etc/ftpusers check did this:
if [ ! "`$GREP '^root' /etc/ftpusers`" ]; then
The problem was with the ""'s, the statement ended up looking like:
if [ ! "root" ]; then
which did not produce the desired results. I believe the origional
author intended to check the return code from the grep, which would also
In which system? It does produce the desired results on Linux. From the
" [-n] STRING
the length of STRING is nonzero"
So, the check there tries to determine if the scring is nonzero and
reverses it. So it ends up saying "if the GREP returns anything then
don't give a warning" (because if it does then root is in the ftpusers)
¿Isn't this the same for HPUX? From reading the HP-UX test manpage (for
HP-UX 10.x  it seems this is also the case for Solaris 
I believe this problem also exists with the /etc/default/login check,
but since I do not have a system to verify this, I left it alone.
Your patch really does not change the behavior in Linux but probably
works ok in HP-UX and Solaris better, I will make changes in all the
file to change the -n implicit behavior and add either -n or -z (if !
was being used).