#354631 zsh-static: error in compaudit with 4.3.0-dev-5-1 as root

Package:
zsh-static
Source:
zsh
Description:
shell with lots of features (static link)
Submitter:
Mark Nipper
Date:
2014-11-14 08:57:08 UTC
Severity:
normal
Blocked By:
Bug Title
471208

  2

libncurses5: ncurses+dietlibc

wishlist stable testing unstable almost 12 years ago

#354631#5
Date:
2006-02-27 20:49:57 UTC
From:
To:
        Starting with 4.3.0-dev-5-1, I now get:
---
compaudit:107: unknown group

with:
---
autoload -U compinit
compinit

in my .zshrc when logging in as root.  I don't get it as any
other user and this happens across multiple different machines.
This did not happen in 4.3.0-dev-2-4.

#354631#10
Date:
2006-03-01 19:52:19 UTC
From:
To:
What groups is root in?  What NSS modules are used to fetch the groups?
What is the group ownership of every directory in root's $fpath and the
parent directories of those?

#354631#15
Date:
2006-03-02 00:14:59 UTC
From:
To:
this is only coming from one of my machines that has this problem
(the simplest setup -- normal nsswitch.conf and such, but it also
happens on machines which are using LDAP; I'll be giving you the
one that doesn't though).

'group' (as root) returns: root

For NSS, my nsswitch.conf (again, on this one machine) has the
standard compat entry for passwd, group and shadow.  Nothing
fancy is happening on this machine.

'echo $fpath' gives me:
---
/usr/local/share/zsh/site-functions
/usr/share/zsh/4.3.0-dev-5/functions/Completion
/usr/share/zsh/4.3.0-dev-5/functions/Completion/AIX
/usr/share/zsh/4.3.0-dev-5/functions/Completion/BSD
/usr/share/zsh/4.3.0-dev-5/functions/Completion/Base
/usr/share/zsh/4.3.0-dev-5/functions/Completion/Cygwin
/usr/share/zsh/4.3.0-dev-5/functions/Completion/Darwin
/usr/share/zsh/4.3.0-dev-5/functions/Completion/Debian
/usr/share/zsh/4.3.0-dev-5/functions/Completion/Linux
/usr/share/zsh/4.3.0-dev-5/functions/Completion/Mandrake
/usr/share/zsh/4.3.0-dev-5/functions/Completion/Redhat
/usr/share/zsh/4.3.0-dev-5/functions/Completion/Unix
/usr/share/zsh/4.3.0-dev-5/functions/Completion/X
/usr/share/zsh/4.3.0-dev-5/functions/Completion/Zsh
/usr/share/zsh/4.3.0-dev-5/functions/Exceptions
/usr/share/zsh/4.3.0-dev-5/functions/MIME
/usr/share/zsh/4.3.0-dev-5/functions/Misc
/usr/share/zsh/4.3.0-dev-5/functions/Prompts
/usr/share/zsh/4.3.0-dev-5/functions/Zle
---

All of those exist, and so 'for i in `echo $fpath`; do ls -alF $i
| grep ' \./'; done' gives me:
---
drwxr-xr-x  2 root staff 48 2005-01-07 02:41 ./
drwxr-xr-x  14 root root  816 2006-02-28 00:19 ./
drwxr-xr-x   2 root root  352 2006-02-28 00:18 ./
drwxr-xr-x   2 root root  144 2006-02-28 00:18 ./
drwxr-xr-x   2 root root 1.7K 2006-02-28 00:18 ./
drwxr-xr-x   2 root root  376 2006-02-28 00:18 ./
drwxr-xr-x   2 root root  336 2006-02-28 00:18 ./
drwxr-xr-x   2 root root  960 2006-02-28 00:18 ./
drwxr-xr-x   2 root root  512 2006-02-28 00:18 ./
drwxr-xr-x   2 root root  72 2006-02-28 00:18 ./
drwxr-xr-x   2 root root  120 2006-02-28 00:18 ./
drwxr-xr-x   2 root root 5.7K 2006-02-28 00:18 ./
drwxr-xr-x   2 root root 1.3K 2006-02-28 00:18 ./
drwxr-xr-x   2 root root 2.0K 2006-02-28 00:18 ./
drwxr-xr-x   2 root root   96 2006-02-28 00:18 ./
drwxr-xr-x   2 root root  144 2006-02-28 00:18 ./
drwxr-xr-x   2 root root  528 2006-02-28 00:18 ./
drwxr-xr-x   2 root root  672 2006-02-28 00:18 ./
drwxr-xr-x   2 root root 1.4K 2006-02-28 00:18 ./
---

For the parent directories:
---
/usr/local/share/zsh:
drwxr-xr-x  3 root root   80 2005-01-07 02:41 ./

/usr/local/share:
drwxr-xr-x  8 root root 192 2006-02-14 00:31 ./

/usr/local:
drwxr-xr-x   9 root  root  240 2005-10-15 20:42 ./

/usr:
drwxr-xr-x   15 root root  344 2005-10-15 20:02 ./

/:
drwxr-xr-x   19 root root  488 2005-12-16 04:05 ./

/usr/share/zsh/4.3.0-dev-5/functions:
drwxr-xr-x  11 root root  528 2006-02-28 00:19 ./

/usr/share/zsh/4.3.0-dev-5:
drwxr-xr-x   4 root root 104 2006-02-28 00:18 ./

/usr/share/zsh:
drwxr-xr-x    4 root root  104 2006-02-28 00:18 ./

/usr/share:
drwxr-xr-x  165 root root 4.3K 2006-02-14 00:32 ./
---

        Let me know if you need anything else or if I didn't
answer your questions correctly.

#354631#22
Date:
2008-02-25 14:39:26 UTC
From:
To:
Hi,

I can reproduce this bug with zsh-static 4.3.5-3. Here are some more
infos: (me is an ordinary user)

% HOME=/ strace -f zsh-static -c 'echo /usr/local/share/zsh/site-functions(f:g+ws:^g:staff:)'
[…]
open("//.zshenv", O_RDONLY|O_NOCTTY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/dev/null", O_RDONLY|O_NOCTTY|O_LARGEFILE) = 3
fcntl64(3, F_DUPFD, 10)                 = 11

So 11 is file descriptor for /dev/null.

close(3)                                = 0
fcntl64(11, F_GETFL)                    = 0x10000 (flags O_RDONLY|O_LARGEFILE)
fstat64(11, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 3), ...}) = 0
ioctl(11, TCGETS, 0xbfd3a188)           = -1 ENOTTY (Inappropriate ioctl for device)

Are you sure you can make this call for the special device /dev/null? The
ENOTTY suggests it requests a TTY.

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x481bc000
_llseek(11, 0, [0], SEEK_CUR)           = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
ioctl(2, TCGETS, 0xbfd30b68)            = -1 EINVAL (Invalid argument)
write(2, "zsh:1: unknown group\n", 21zsh:1: unknown group
)  = 21
rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
exit_group(1)                           = ?

Bye, Jörg.

#354631#27
Date:
2008-02-26 14:55:35 UTC
From:
To:
Hi Jörg.. the problem is that user/group lookups are disabled in the
-static build because glibc's NSS ABI is unstable and static binaries
still need to load NSS modules dynamically.

If we re-enable lookups, then zsh-static will segfault on any major libc
upgrade.  I don't know what the best solution here is.

#354631#32
Date:
2008-02-26 23:45:28 UTC
From:
To:
Hallo Clint,

Clint Adams schrieb am Tue 26. Feb, 09:55 (-0500):

Are you shure it is the group lookup? From the strace I thought it is a
problem with ioctl call.

If it's a problem with the group lookup, maybe you can change it to a
“grep” in /etc/group. Another idea was to use the id of the group, but
zsh tries still to lookup the entry. Why? Maybe for a numeric id it could
skip the lookup.

Bye, Jörg.

#354631#37
Date:
2008-03-02 18:19:14 UTC
From:
To:
Hallo Clint,

Clint Adams schrieb am Tue 26. Feb, 09:55 (-0500):

Another idea: What about linking with dietlibc or uClibc?

Bye, Jörg.

#354631#42
Date:
2008-03-02 19:36:54 UTC
From:
To:
That's a pretty good idea.
#354631#47
Date:
2008-12-30 00:07:46 UTC
From:
To:
I can reproduce this with zsh-static 4.3.6


Richard

#354631#52
Date:
2008-12-30 16:08:51 UTC
From:
To:
block 354631 by 471208
block 354633 by 471208
quit

Adding blocking relationships.