Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
The last 4 patches are follow-up patches for bug #10127 - smbstatus stopped
working as non-root user.
static int net_serverid_list(struct net_context *c, int argc,
const char **argv)
{
+ if (!serverid_init_readonly(c)) {
+ d_printf("failed to open serverid.tdb\n");
+ return -1;
+ }
d_printf("pid unique_id msg_flags\n");
return serverid_traverse_read(net_serverid_list_fn, NULL) ? 0 : -1;
}
#include "session.h"
#include "locking/proto.h"
#include "messages.h"
+#include "serverid.h"
#define SMB_MAXPIDS 2048
static uid_t Ucrit_uid = 0; /* added by OH */
goto done;
}
+ if (!serverid_init_readonly(frame)) {
+ d_printf("Can't initialise serverid tdb - exiting\n");
+ ret = 1;
+ goto done;
+ }
result = share_mode_forall(print_share_mode, NULL);
if (result == 0) {