svn commit: samba r8759 - in branches/SAMBA_4_0/source: libnet torture/libnet

mimir at samba.org mimir at samba.org
Mon Jul 25 22:00:57 GMT 2005


Author: mimir
Date: 2005-07-25 22:00:56 +0000 (Mon, 25 Jul 2005)
New Revision: 8759

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

Log:
Another couple of fields in usermod routine.


rafal


Modified:
   branches/SAMBA_4_0/source/libnet/composite.h
   branches/SAMBA_4_0/source/libnet/userman.c
   branches/SAMBA_4_0/source/torture/libnet/userman.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/composite.h
===================================================================
--- branches/SAMBA_4_0/source/libnet/composite.h	2005-07-25 19:30:22 UTC (rev 8758)
+++ branches/SAMBA_4_0/source/libnet/composite.h	2005-07-25 22:00:56 UTC (rev 8759)
@@ -61,6 +61,9 @@
 
 #define USERMOD_FIELD_ACCOUNT_NAME    ( 0x00000001 )
 #define USERMOD_FIELD_FULL_NAME       ( 0x00000002 )
+#define USERMOD_FIELD_DESCRIPTION     ( 0x00000010 )
+#define USERMOD_FIELD_LOGON_SCRIPT    ( 0x00000100 )
+#define USERMOD_FIELD_PROFILE_PATH    ( 0x00000200 )
 
 struct libnet_rpc_usermod {
 	struct {
@@ -72,6 +75,9 @@
 
 			const char *account_name;
 			const char *full_name;
+			const char *description;
+			const char *logon_script;
+			const char *profile_path;
 		} change;
 	} in;
 };

Modified: branches/SAMBA_4_0/source/libnet/userman.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/userman.c	2005-07-25 19:30:22 UTC (rev 8758)
+++ branches/SAMBA_4_0/source/libnet/userman.c	2005-07-25 22:00:56 UTC (rev 8759)
@@ -496,6 +496,30 @@
 			i->info8.full_name.string = s->change.full_name;
 			
 			s->change.fields ^= USERMOD_FIELD_FULL_NAME;
+
+		} else if (s->change.fields & USERMOD_FIELD_DESCRIPTION) {
+			level = 13;
+			i->info13.description.length = 2*strlen_m(s->change.description);
+			i->info13.description.size   = 2*strlen_m(s->change.description);
+			i->info13.description.string = s->change.description;
+			
+			s->change.fields ^= USERMOD_FIELD_DESCRIPTION;
+
+		} else if (s->change.fields & USERMOD_FIELD_LOGON_SCRIPT) {
+			level = 11;
+			i->info11.logon_script.length = 2*strlen_m(s->change.logon_script);
+			i->info11.logon_script.size   = 2*strlen_m(s->change.logon_script);
+			i->info11.logon_script.string = s->change.logon_script;
+			
+			s->change.fields ^= USERMOD_FIELD_LOGON_SCRIPT;
+
+		} else if (s->change.fields & USERMOD_FIELD_PROFILE_PATH) {
+			level = 12;
+			i->info12.profile_path.length = 2*strlen_m(s->change.profile_path);
+			i->info12.profile_path.size   = 2*strlen_m(s->change.profile_path);
+			i->info12.profile_path.string = s->change.profile_path;
+
+			s->change.fields ^= USERMOD_FIELD_PROFILE_PATH;
 		}
 	}
 

Modified: branches/SAMBA_4_0/source/torture/libnet/userman.c
===================================================================
--- branches/SAMBA_4_0/source/torture/libnet/userman.c	2005-07-25 19:30:22 UTC (rev 8758)
+++ branches/SAMBA_4_0/source/torture/libnet/userman.c	2005-07-25 22:00:56 UTC (rev 8759)
@@ -414,8 +414,11 @@
 	int i;
 
 	struct usermod_change changes[] = {
-		{ USERMOD_FIELD_ACCOUNT_NAME, "changed", NULL },
-		{ USERMOD_FIELD_FULL_NAME,    NULL, "Testing full account name" }
+		{ USERMOD_FIELD_ACCOUNT_NAME, "changed", NULL, NULL, NULL, NULL },
+		{ USERMOD_FIELD_FULL_NAME,    NULL, "Testing full account name", NULL, NULL, NULL },
+		{ USERMOD_FIELD_DESCRIPTION,  NULL, NULL, "Description of tested account", NULL, NULL },
+		{ USERMOD_FIELD_LOGON_SCRIPT, NULL, NULL, NULL, "test_logon.cmd", NULL },
+		{ USERMOD_FIELD_PROFILE_PATH, NULL, NULL, NULL, NULL, "\\\\TESTSRV\\profiles\\test" }
 	};
 	
 	mem_ctx = talloc_init("test_userdel");



More information about the samba-cvs mailing list