Bug 6119 - net groupmap add segfaults with passdb backend = tdbsam
net groupmap add segfaults with passdb backend = tdbsam
Status: RESOLVED DUPLICATE of bug 6117
Product: Samba 3.3
Classification: Unclassified
Component: User & Group Accounts
x86 Linux
: P3 normal
: ---
Assigned To: Samba Bugzilla Account
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2009-02-17 08:44 UTC by Neil Hoggarth
Modified: 2009-02-17 15:52 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Neil Hoggarth 2009-02-17 08:44:21 UTC
Samba v3.3.0 built from source, running on Ubuntu 8.04.2 on x86_64. The 
configuration is a standalone server with user security, smb.conf:

  passdb backend = tdbsam

  comment = Home Directory
  read only = no
  allow hosts =,,

Attempts to add group mappings with "net groupmap add ..." fail with a segfault,
apparently at the point where the system attempts to determine a suitable RID
to use for the Windows group:

root@willis:~# gdb net
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(gdb) run groupmap add unixgroup=users
Starting program: /usr/local/samba/bin/net groupmap add unixgroup=users
[Thread debugging using libthread_db enabled]
[New Thread 0x7f0c00f04700 (LWP 15638)]
No rid or sid specified, choosing a RID

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f0c00f04700 (LWP 15638)]
dbwrap_change_uint32_atomic (db=0x0, keystr=0x7f0c01367498 "NEXT_RID",
    oldval=0x7fff0943b82c, change_val=1) at lib/dbwrap_util.c:115
115             if (!(rec = db->fetch_locked(db, NULL,
(gdb) bt
#0  dbwrap_change_uint32_atomic (db=0x0, keystr=0x7f0c01367498 "NEXT_RID",
    oldval=0x7fff0943b82c, change_val=1) at lib/dbwrap_util.c:115
#1  0x00007f0c010daa01 in tdbsam_new_rid (methods=<value optimized out>,
    prid=0x7fff0943b850) at passdb/pdb_tdb.c:780
#2  0x00007f0c010bf1d6 in pdb_new_rid (rid=0x7fff0943b90c)
    at passdb/pdb_interface.c:1093
#3  0x00007f0c00fd1dc8 in net_groupmap_add (c=<value optimized out>, argc=1,
    argv=<value optimized out>) at utils/net_groupmap.c:282
#4  0x00007f0c00fe2ee2 in net_run_function (c=0x7f0c0165d150, argc=2,
    argv=0x7f0c0165d050, whoami=0x7f0c013200ad "net groupmap",
    table=0x7fff0943c180) at utils/net_util.c:571
#5  0x00007f0c00fcfc24 in net_groupmap (c=0x7f0c0165d150, argc=2,
    argv=0x7f0c0165d050) at utils/net_groupmap.c:904
#6  0x00007f0c00fe2ee2 in net_run_function (c=0x7f0c0165d150, argc=3,
    argv=0x7f0c0165d048, whoami=0x7f0c01313138 "net", table=0x7f0c016510b8)
    at utils/net_util.c:571
#7  0x00007f0c00fb9850 in main (argc=4, argv=0x7fff0943cbb8) at utils/net.c:767

Group mapping does appear to succeed with passdb backend = smbpasswd.
Comment 1 Jeremy Allison 2009-02-17 15:52:51 UTC
This looks identical to bug #6117 (same backtrace) which I just fixed.
Thanks !


*** This bug has been marked as a duplicate of 6117 ***