Arch Linux

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!
Tasklist

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
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture i686
Severity Medium
Priority Normal
Reported Version 0.8 Voodoo
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Adding 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

Closed by  Greg (dolby)
Friday, 18 July 2008, 13:16 GMT
Reason for closing:  Fixed
Comment by Tobias Powalowski (tpowa) - Sunday, 06 May 2007, 09:26 GMT
i can confirm this :/
Comment by balder.theglorious@googlemail.com (balder) - Tuesday, 13 November 2007, 11:22 GMT
Also confirmed
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 +++
Comment by Roman Kyrylych (Romashka) - Saturday, 09 February 2008, 20:17 GMT
I think there's a mistake in Details: useradd b should be groupadd b ;)
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). :-(
Comment by Aaron Griffin (phrakture) - Monday, 10 March 2008, 18:49 GMT
Would anyone mind checking the new upstream version?
I will attempt to rebuild later today
Comment by balder.theglorious@googlemail.com (balder) - Tuesday, 11 March 2008, 20:20 GMT
yes this worked I did the following to /var/abs/core/base/shadow/PKGBUILD

------------------------
--- 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
Comment by Greg (dolby) - Saturday, 17 May 2008, 21:57 GMT
This just needs to be rebuilt. In the meanwhile 4.1.1 is out

Loading...