Bug 6119 - net groupmap add segfaults with passdb backend = tdbsam
Summary: net groupmap add segfaults with passdb backend = tdbsam
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.3
Classification: Unclassified
Component: User & Group Accounts (show other bugs)
Version: 3.3.0
Hardware: x86 Linux
: P3 normal
Target Milestone: ---
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
: 6117 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-17 08:44 UTC by Neil Hoggarth
Modified: 2020-05-10 15:16 UTC (History)
1 user (show)

See Also:


Attachments

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:

[global]
  passdb backend = tdbsam

[homes]
  comment = Home Directory
  read only = no
  allow hosts = 163.1.29.0/24,163.1.122.0/23,163.1.248.0/22

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
(gdb)


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 !

Jeremy.


*** This bug has been marked as a duplicate of 6117 ***
Comment 2 Björn Jacke 2020-05-10 15:05:57 UTC

*** This bug has been marked as a duplicate of bug 6117 ***
Comment 3 Björn Jacke 2020-05-10 15:16:16 UTC
*** Bug 6117 has been marked as a duplicate of this bug. ***