tiger-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tiger-devel] Misc. errors on Sun 5.8


From: Nicolas François
Subject: Re: [Tiger-devel] Misc. errors on Sun 5.8
Date: Tue, 14 Oct 2003 23:57:53 +0200
User-agent: Mutt/1.5.4i

Hello,

I had a look at some of the issues you mentionned:

On Tue, Oct 14, 2003 at 12:41:17PM -0500, Cox, Michael wrote:
> 2) There appear to be a couple of problems (on Solaris 8 at least) with line
> 255 of check_passwd. The line is:
> 
> $GREP -Ev ^$admin_account_list: $WORKDIR/p1uid.$$ |
> 
> First, GREP is given the -E option, but GREP=/usr/bin/grep which doesn't
> support -E (/usr/xpg4/bin/grep does).  Is the -E even needed? I think the ^
> is understood without it.

on linux: Egrep is the same as grep -E.
egrep is needed here because of the '|'s in $admin_account_list.

I attach a patch for this (untested ;D)
It:
  - change GREP to EGREP
  - add EGREP to the haveallcommand (also add SED to one of the calls)
  - simplify the call to GREP (remove the temporary variable
    admin_account_list)

> 3) + ./scripts/check_aliases
> grep: can't open /etc/sendmail.cf
> 
> On Solaris, I think this usually lives in /etc/mail/sendmail.cf.

The same on the solaris box I have an access.

> 4) Misc. other errors. I'm not sure if they're problems or not.
> 
> + ./scripts/check_accounts
> ./scripts/check_accounts: bad substitution
> ./scripts/check_accounts: bad substitution
> ./scripts/check_accounts: bad substitution
${parameter%word} is not supported by Solaris' /bin/sh
(lines 245, 249)
${parameter##word} neither
(lines 293, 294)
The number of "bad substitution" seems to match with this.

I have no other idea than changing the shell or using awk or sed to fix
this.

> ./scripts/check_tcpd: test: argument expected
I think it is caused by -e test's option. It seems to be unsopported by
/bin/sh:
$ touch tmpfile
$ test -e tmpfile && echo yes || echo no
test: argument expected
$ [ -e tmpfile ] && echo yes || echo no
test: argument expected

`man 1 test` on Solaris describes test options for sh, csh and ksh.
/usr/bin/test can be used instead if -e is needed:
  $ /usr/bin/test -e tmpfile && echo yes || echo no
  yes
-e can also be replaced by -f or TESTEXEC

(a patch is attached)

> ./scripts/check_rhosts: test: argument expected
idem: line 229 [ -e $homedir/.rhosts ]
-f can replace -e (it's even probably better)

BTW, I added tests for TESTLINK and HOSTNAME.
(a patch is attached)

> + ./scripts/check_ssh
> ./scripts/check_ssh: bad substitution
> ./scripts/check_ssh: bad substitution
same as scripts/check_accounts:
${parameter%%word} lines 95 144
${parameter##word} lines 96 97 147 155 156 162 163
The number of "bad substitution" seems to match with these parameter
substitutions (with some supposition on which part of the script are
executed).


At the moment, I can't test these patches neither on Solaris nor on
Linux.

hth
-- 
Nekral

Attachment: check_passwd.patch
Description: Text document

Attachment: check_rhosts.patch
Description: Text document

Attachment: check_tcpd.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]