Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#6985 - shadow 4.0.18.1-4: groupmems segmentation fault
Attached to Project:
Arch Linux
Opened by Oleg Stopolenko (cronfy) - Monday, 23 April 2007, 19:34 GMT
Last edited by Greg (dolby) - Friday, 18 July 2008, 13:16 GMT
Opened by Oleg Stopolenko (cronfy) - Monday, 23 April 2007, 19:34 GMT
Last edited by Greg (dolby) - Friday, 18 July 2008, 13:16 GMT
|
DetailsAdding a user to a group with groupmems causes segmentation fault.
Reproduceable; always Steps to reproduce: # useradd a # useradd b # groupmems -a a -g b Segmentation fault Expected result: I expected user 'a' to be added to group 'b'. |
This task depends upon
Linux e228-linux 2.6.23-ARCH #1 SMP PREEMPT Sat Oct 27 09:04:14 UTC 2007 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux
strace `which groupmems` -a jb -g dev
.
.
.
kill(26688, SIG_0) = -1 ESRCH (No such process)
unlink("/etc/group.lock") = 0
link("/etc/group.26726", "/etc/group.lock") = 0
stat64("/etc/group.26726", {st_mode=S_IFREG|0600, st_size=6, ...}) = 0
unlink("/etc/group.26726") = 0
open("/etc/group", O_RDWR|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=452, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fa6000
read(4, "root::0:root\nbin::1:root,bin,dae"..., 4096) = 452
read(4, "", 4096) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
But still:
# useradd a
# groupadd b
# groupmems -a a -g b
Segmentation fault
I didn't see a notice that this is fixed in the changelog for the next 4.1.0 version
(which is already released by upstream, BTW). :-(
I will attempt to rebuild later today
------------------------
--- PKGBUILD 2008-03-11 19:39:26.000000000 +0000
+++ PKGBUILD-orig 2008-03-11 20:04:17.000000000 +0000
@@ -2,7 +2,7 @@
# Maintainer: judd <jvinet@zeroflux.org>
pkgname=shadow
-pkgver=4.1.0
+pkgver=4.0.18.2
pkgrel=2
pkgdesc="Shadow password file utilities"
arch=(i686 x86_64)
@@ -17,7 +17,7 @@
depends=('pam')
source=(ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-$pkgver.tar.bz2
login passwd useradd login.defs adduser shadow.cron.daily
- useradd-default.patch xstrdup.patch) # shadow-4.0.18.2-useradd-fix-1.patch)
+ useradd-default.patch xstrdup.patch shadow-4.0.18.2-useradd-fix-1.patch)
options=(!libtool)
install='shadow.install'
@@ -25,7 +25,7 @@
build() {
cd $startdir/src/$pkgname-$pkgver
patch -Np1 -i ../xstrdup.patch || return 1
- #patch -Np1 -i ../shadow-4.0.18.2-useradd-fix-1.patch || return 1
+ patch -Np1 -i ../shadow-4.0.18.2-useradd-fix-1.patch || return 1
# patch etc/default/useradd for Arch defaults - Tom K
patch -Np1 -i ../useradd-default.patch || return 1
-------------------------------------
testing
--------------------
test@archlinux $ useradd test
test@archlinux $ id test
uid=1003(test) gid=1003(test) groups=1003(test)
test@archlinux $ ./pkg/usr/sbin/groupmems -a test -g games
test@archlinux $ id test
uid=1003(test) gid=1003(test) groups=1003(test),50(games)
test@archlinux $ ./pkg/usr/sbin/groupmems -d test -g games
test@archlinux $ id test
uid=1003(test) gid=1003(test) groups=1003(test)
test@archlinux $ userdel test
--------------------------------
note this obviously causes an md5 hash warning