net sam list groups causes a segmentation fault

Bug #361802 reported by Brian Beck
2
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: samba-common

When I run "net sam list groups" with a non root account I get a segmentation fault. I'm not certain if this is expected behaviour, though I imagine not.

On Ubuntu 8.10 (samba-common 2:3.2.3-1ubuntu3.5):

$ net sam list groups
You are not root, most things won't work
[2009/04/15 10:54:28, 0] passdb/secrets.c:secrets_init(71)
  Failed to open /var/lib/samba/secrets.tdb
[2009/04/15 10:54:28, 0] lib/util.c:smb_panic(1663)
  PANIC (pid 11532): could not open secrets db
[2009/04/15 10:54:28, 0] lib/util.c:log_stack_trace(1767)
  BACKTRACE: 14 stack frames:
   #0 net(log_stack_trace+0x2d) [0xb7df052c]
   #1 net(smb_panic+0x80) [0xb7df0689]
   #2 net(get_global_sam_sid+0x50) [0xb7d43ac4]
   #3 net [0xb7d9bca1]
   #4 net(pdb_search_groups+0x40) [0xb7d9b469]
   #5 net [0xb7cedf81]
   #6 net(net_run_function2+0x6d) [0xb7cb9e26]
   #7 net [0xb7ceb203]
   #8 net(net_run_function2+0x6d) [0xb7cb9e26]
   #9 net(net_sam+0x79) [0xb7ceae39]
   #10 net(net_run_function+0x73) [0xb7cb9eee]
   #11 net(main+0x800) [0xb7cba736]
   #12 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb78af685]
   #13 net [0xb7cb8051]
[2009/04/15 10:54:28, 0] lib/util.c:smb_panic(1668)
  smb_panic(): calling panic action [/usr/share/samba/panic-action 11532]
[2009/04/15 10:54:29, 0] lib/util.c:smb_panic(1676)
  smb_panic(): action returned status 0
Segmentation fault

On Ubuntu 9.04 (samba-common 2:3.3.2-1ubuntu3)

$ net sam list groups
You are not root, most things won't work
[2009/04/15 11:06:22, 0] passdb/secrets.c:secrets_init(71)
  Failed to open /var/lib/samba/secrets.tdb
[2009/04/15 11:06:22, 0] lib/util.c:smb_panic(1673)
  PANIC (pid 4396): could not open secrets db
[2009/04/15 11:06:22, 0] lib/util.c:log_stack_trace(1777)
  BACKTRACE: 14 stack frames:
   #0 net(log_stack_trace+0x1c) [0x7fa90e95941d]
   #1 net(smb_panic+0x5b) [0x7fa90e95952b]
   #2 net(get_global_sam_sid+0x54) [0x7fa90e885fd9]
   #3 net [0x7fa90e90e362]
   #4 net(pdb_search_groups+0x34) [0x7fa90e90daa3]
   #5 net [0x7fa90e8312f7]
   #6 net(net_run_function+0x4d) [0x7fa90e832fd9]
   #7 net [0x7fa90e82e8df]
   #8 net(net_run_function+0x4d) [0x7fa90e832fd9]
   #9 net(net_sam+0x6b) [0x7fa90e82e7cb]
   #10 net(net_run_function+0x4d) [0x7fa90e832fd9]
   #11 net(main+0x898) [0x7fa90e8096c8]
   #12 /lib/libc.so.6(__libc_start_main+0xe6) [0x7fa90bd9d5a6]
   #13 net [0x7fa90e808d49]
[2009/04/15 11:06:22, 0] lib/util.c:smb_panic(1678)
  smb_panic(): calling panic action [/usr/share/samba/panic-action 4396]
[2009/04/15 11:06:22, 0] lib/util.c:smb_panic(1686)
  smb_panic(): action returned status 0
[2009/04/15 11:06:22, 0] lib/fault.c:dump_core(217)
  Can not dump core: corepath not set up

Revision history for this message
Thierry Carrez (ttx) wrote :

In Jaunty it doesn't segfault anymore, it just fails miserably. I'm closing this as "Fix Released" in the development release.

However, I agree that the "most things won't work" message is an understatement, and that PANIC/BACKTRACE messages are not exactly the best way to handle some very common user error. Feel free to reopen this bug (and edit Title/Description) if you think *that* should get fixed as well. Ideally that should be submitted as an upstream bug directly.

Changed in samba (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.