mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
s3: Fix connecting to ctdb as non-root
This is at least one instance which I could identify Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Jun 14 19:06:39 CEST 2011 on sn-devel-104
This commit is contained in:
parent
2817eed741
commit
df6b877cc2
@ -112,7 +112,14 @@ int count_current_connections( const char *sharename, bool clear )
|
||||
* as it leads to deadlock.
|
||||
*/
|
||||
|
||||
/*
|
||||
* become_root() because we might have to open connections.tdb
|
||||
* via ctdb, which is not possible without root.
|
||||
*/
|
||||
become_root();
|
||||
ret = connections_forall(count_fn, &cs);
|
||||
unbecome_root();
|
||||
|
||||
if (ret == -1) {
|
||||
DEBUG(0,("count_current_connections: traverse of "
|
||||
"connections.tdb failed\n"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user