From 868d010aa1b614109b54928e46eb626a1d320a2d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 22 Jun 2001 15:14:45 +0000 Subject: added the ability to test smbd safely as an ordinary user. The way it works is that libsmb/ creates a local tcp socket then launches smbd as a subprocess attached to that socket. smbd thinks it is being launched from inetd. to use it do the following: - compile with -DSMB_REGRESSION_TEST - run like this (also works with smbtorture etc) export SMBD_TEST=1 export LIBSMB_PROG=bin/smbd smbclient //server/share -Uuser%pass obviously you need to setup a smb.conf etc. Using --prefix to configure is useful. The aim of all this stuff is to add a decent set of regression tests to the build farm, so we know if smbd actually runs correctly on all the platforms, not just builds. We can run smbtorture, masktest, locktest etc, plus a bunch of smbclient scripts and any new tests we write. This doesn't help much with nmbd (at least not yet) but its a good start. (This used to be commit 7e8e6ae9a88c4d2587eb4e7f0501cd71bd36ebb2) --- source3/smbd/server.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/smbd/server.c') diff --git a/source3/smbd/server.c b/source3/smbd/server.c index fcee30d667..f4c82839bb 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -626,10 +626,12 @@ static void usage(char *pname) * dump if euid != 0. Ensure this is the case. */ +#ifndef SMB_REGRESSION_TEST if(geteuid() != (uid_t)0) { fprintf(stderr, "%s: Version %s : Must have effective user id of zero to run.\n", argv[0], VERSION); exit(1); } +#endif append_log = True; -- cgit