svn commit: samba r6007 - in trunk/source: smbd torture utils

jerry at samba.org jerry at samba.org
Wed Mar 23 21:30:11 GMT 2005


Author: jerry
Date: 2005-03-23 21:30:09 +0000 (Wed, 23 Mar 2005)
New Revision: 6007

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6007

Log:
more fixes from 3.0
Modified:
   trunk/source/smbd/service.c
   trunk/source/torture/masktest.c
   trunk/source/torture/nbio.c
   trunk/source/utils/net_help.c
   trunk/source/utils/net_rpc.c
   trunk/source/utils/pdbedit.c


Changeset:
Modified: trunk/source/smbd/service.c
===================================================================
--- trunk/source/smbd/service.c	2005-03-23 21:17:51 UTC (rev 6006)
+++ trunk/source/smbd/service.c	2005-03-23 21:30:09 UTC (rev 6007)
@@ -606,22 +606,10 @@
 	}
 #endif
 	
-#if CHECK_PATH_ON_TCONX
 	/* win2000 does not check the permissions on the directory
 	   during the tree connect, instead relying on permission
 	   check during individual operations. To match this behaviour
 	   I have disabled this chdir check (tridge) */
-	if (vfs_ChDir(conn,conn->connectpath) != 0) {
-		DEBUG(0,("%s (%s) Can't change directory to %s (%s)\n",
-			 get_remote_machine_name(), conn->client_address,
-			 conn->connectpath,strerror(errno)));
-		change_to_root_user();
-		yield_connection(conn, lp_servicename(SNUM(conn)));
-		conn_free(conn);
-		*status = NT_STATUS_BAD_NETWORK_NAME;
-		return NULL;
-	}
-#else
 	/* the alternative is just to check the directory exists */
 	if (SMB_VFS_STAT(conn, conn->connectpath, &st) != 0 || !S_ISDIR(st.st_mode)) {
 		DEBUG(0,("'%s' does not exist or is not a directory, when connecting to [%s]\n", conn->connectpath, lp_servicename(SNUM(conn))));
@@ -631,7 +619,6 @@
 		*status = NT_STATUS_BAD_NETWORK_NAME;
 		return NULL;
 	}
-#endif
 	
 	string_set(&conn->origpath,conn->connectpath);
 	

Modified: trunk/source/torture/masktest.c
===================================================================
--- trunk/source/torture/masktest.c	2005-03-23 21:17:51 UTC (rev 6006)
+++ trunk/source/torture/masktest.c	2005-03-23 21:30:09 UTC (rev 6007)
@@ -255,7 +255,7 @@
 static char *resultp;
 static file_info *f_info;
 
-static void listfn(file_info *f, const char *s, void *state)
+static void listfn(const char *mnt, file_info *f, const char *s, void *state)
 {
 	if (strcmp(f->name,".") == 0) {
 		resultp[0] = '+';

Modified: trunk/source/torture/nbio.c
===================================================================
--- trunk/source/torture/nbio.c	2005-03-23 21:17:51 UTC (rev 6006)
+++ trunk/source/torture/nbio.c	2005-03-23 21:30:09 UTC (rev 6007)
@@ -257,7 +257,7 @@
 	cli_dskattr(c, &bsize, &total, &avail);
 }
 
-static void find_fn(file_info *finfo, const char *name, void *state)
+static void find_fn(const char *mnt, file_info *finfo, const char *name, void *state)
 {
 	/* noop */
 }
@@ -276,7 +276,7 @@
 
 static int total_deleted;
 
-static void delete_fn(file_info *finfo, const char *name, void *state)
+static void delete_fn(const char *mnt, file_info *finfo, const char *name, void *state)
 {
 	char *s, *n;
 	if (finfo->name[0] == '.') return;

Modified: trunk/source/utils/net_help.c
===================================================================
--- trunk/source/utils/net_help.c	2005-03-23 21:17:51 UTC (rev 6006)
+++ trunk/source/utils/net_help.c	2005-03-23 21:30:09 UTC (rev 6007)
@@ -99,6 +99,8 @@
 	d_printf("\nnet [<method>] group ADD <name> [-C comment] [-c container]"\
 		 " [misc. options] [targets]\n\tCreate specified group\n");
 	d_printf("\nnet rpc group MEMBERS <name>\n\tList Group Members\n\n");
+	d_printf("\nnet rpc group ADDMEM <group> <member>\n\tAdd Group Members\n\n");
+	d_printf("\nnet rpc group DELMEM <group> <member>\n\tDelete Group Members\n\n");
 	net_common_methods_usage(argc, argv);
 	net_common_flags_usage(argc, argv);
 	d_printf("\t-C or --comment=<comment>\tdescriptive comment (for add only)\n");

Modified: trunk/source/utils/net_rpc.c
===================================================================
--- trunk/source/utils/net_rpc.c	2005-03-23 21:17:51 UTC (rev 6006)
+++ trunk/source/utils/net_rpc.c	2005-03-23 21:30:09 UTC (rev 6007)
@@ -4674,7 +4674,8 @@
 			 for domain %s\n", domain_name));
 	}
 	 
-	if (!(mem_ctx = talloc_init("rpc_trustdom_establish"))) {
+	if (!(mem_ctx = talloc_init("establishing trust relationship to "
+				    "domain %s", domain_name))) {
 		DEBUG(0, ("talloc_init() failed\n"));
 		cli_shutdown(cli);
 		return -1;

Modified: trunk/source/utils/pdbedit.c
===================================================================
--- trunk/source/utils/pdbedit.c	2005-03-23 21:17:51 UTC (rev 6006)
+++ trunk/source/utils/pdbedit.c	2005-03-23 21:30:09 UTC (rev 6007)
@@ -320,6 +320,7 @@
 
 static int set_user_info (struct pdb_context *in, const char *username, 
 			  const char *fullname, const char *homedir, 
+			  const char *acct_desc, 
 			  const char *drive, const char *script, 
 			  const char *profile, const char *account_control,
 			  const char *user_sid, const char *group_sid,
@@ -367,6 +368,8 @@
 
 	if (fullname)
 		pdb_set_fullname(sam_pwent, fullname, PDB_CHANGED);
+	if (acct_desc)
+		pdb_set_acct_desc(sam_pwent, acct_desc, PDB_CHANGED);
 	if (homedir)
 		pdb_set_homedir(sam_pwent, homedir, PDB_CHANGED);
 	if (drive)
@@ -662,6 +665,7 @@
 	uint32	setparms, checkparms;
 	int opt;
 	static char *full_name = NULL;
+	static char *acct_desc = NULL;
 	static const char *user_name = NULL;
 	static char *home_dir = NULL;
 	static char *home_drive = NULL;
@@ -695,6 +699,7 @@
 		{"verbose",	'v', POPT_ARG_NONE, &verbose, 0, "be verbose", NULL },
 		{"smbpasswd-style",	'w',POPT_ARG_NONE, &spstyle, 0, "give output in smbpasswd style", NULL},
 		{"user",	'u', POPT_ARG_STRING, &user_name, 0, "use username", "USER" },
+		{"account-desc",	'N', POPT_ARG_STRING, &acct_desc, 0, "set account description", NULL},
 		{"fullname",	'f', POPT_ARG_STRING, &full_name, 0, "set full name", NULL},
 		{"homedir",	'h', POPT_ARG_STRING, &home_dir, 0, "set home directory", NULL},
 		{"drive",	'D', POPT_ARG_STRING, &home_drive, 0, "set home drive", NULL},
@@ -988,6 +993,7 @@
 			}
 			return set_user_info (bdef, user_name, full_name,
 					      home_dir,
+					      acct_desc,
 					      home_drive,
 					      logon_script,
 					      profile_path, account_control,



More information about the samba-cvs mailing list