svn commit: samba r6941 - in trunk/source: param rpcclient

jerry at samba.org jerry at samba.org
Mon May 23 15:44:58 GMT 2005


Author: jerry
Date: 2005-05-23 15:44:58 +0000 (Mon, 23 May 2005)
New Revision: 6941

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

Log:
syncing a few changes from SAMBA_3_0
Modified:
   trunk/source/param/loadparm.c
   trunk/source/rpcclient/cmd_reg.c


Changeset:
Modified: trunk/source/param/loadparm.c
===================================================================
--- trunk/source/param/loadparm.c	2005-05-23 15:25:38 UTC (rev 6940)
+++ trunk/source/param/loadparm.c	2005-05-23 15:44:58 UTC (rev 6941)
@@ -58,6 +58,7 @@
 
 extern userdom_struct current_user_info;
 extern pstring user_socket_options;
+extern enum protocol_types Protocol;
 
 #ifndef GLOBAL_NAME
 #define GLOBAL_NAME "global"
@@ -73,7 +74,7 @@
 
 /* some helpful bits */
 #define LP_SNUM_OK(i) (((i) >= 0) && ((i) < iNumServices) && ServicePtrs[(i)]->valid)
-#define VALID(i) ServicePtrs[i]->valid
+#define VALID(i) (ServicePtrs != NULL && ServicePtrs[i]->valid)
 
 int keepalive = DEFAULT_KEEPALIVE;
 BOOL use_getwd_cache = True;
@@ -863,7 +864,7 @@
 	{"admin users", P_LIST, P_LOCAL, &sDefault.szAdminUsers, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE}, 
 	{"read list", P_LIST, P_LOCAL, &sDefault.readlist, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE}, 
 	{"write list", P_LIST, P_LOCAL, &sDefault.writelist, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE}, 
-	{"printer admin", P_LIST, P_LOCAL, &sDefault.printer_admin, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL | FLAG_PRINT}, 
+	{"printer admin", P_LIST, P_LOCAL, &sDefault.printer_admin, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL | FLAG_PRINT | FLAG_DEPRECATED }, 
 	{"force user", P_STRING, P_LOCAL, &sDefault.force_user, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE}, 
 	{"force group", P_STRING, P_LOCAL, &sDefault.force_group, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE}, 
 	{"group", P_STRING, P_LOCAL, &sDefault.force_group, NULL, NULL, FLAG_ADVANCED}, 
@@ -931,7 +932,7 @@
 	{"disable netbios", P_BOOL, P_GLOBAL, &Globals.bDisableNetbios, NULL, NULL, FLAG_ADVANCED}, 
 
 	{"acl compatibility", P_STRING, P_GLOBAL, &Globals.szAclCompat, handle_acl_compatibility,  NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
-	{ "defer sharing violations", P_BOOL, P_GLOBAL, &Globals.bDeferSharingViolations, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL},
+	{"defer sharing violations", P_BOOL, P_GLOBAL, &Globals.bDeferSharingViolations, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL},
 	{"ea support", P_BOOL, P_LOCAL, &sDefault.bEASupport, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
 	{"nt acl support", P_BOOL, P_LOCAL, &sDefault.bNTAclSupport, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL}, 
 	{"nt pipe support", P_BOOL, P_GLOBAL, &Globals.bNTPipeSupport, NULL, NULL, FLAG_ADVANCED}, 
@@ -4410,7 +4411,6 @@
 
 BOOL lp_use_sendfile(int snum)
 {
-	extern enum protocol_types Protocol;
 	/* Using sendfile blows the brains out of any DOS or Win9x TCP stack... JRA. */
 	if (Protocol < PROTOCOL_NT1) {
 		return False;

Modified: trunk/source/rpcclient/cmd_reg.c
===================================================================
--- trunk/source/rpcclient/cmd_reg.c	2005-05-23 15:25:38 UTC (rev 6940)
+++ trunk/source/rpcclient/cmd_reg.c	2005-05-23 15:44:58 UTC (rev 6941)
@@ -320,7 +320,7 @@
 /****************************************************************************
 nt registry create value
 ****************************************************************************/
-static void cmd_reg_create_val(struct client_info *info)
+static void cmd_reg_set_val(struct client_info *info)
 {
 	BOOL res = True;
 	BOOL res3 = True;
@@ -333,7 +333,7 @@
 	fstring val_name;
 	fstring tmp;
 	uint32 val_type;
-	BUFFER3 value;
+	RPC_DATA_BLOB value;
 
 #if 0
 	uint32 unk_0;
@@ -343,7 +343,7 @@
 	                        val_name, *val_type) : False;
 #endif
 
-	DEBUG(5, ("cmd_reg_create_val: smb_cli->fd:%d\n", smb_cli->fd));
+	DEBUG(5, ("cmd_reg_set_val: smb_cli->fd:%d\n", smb_cli->fd));
 
 	if (!next_token_nr(NULL, full_keyname, NULL, sizeof(full_keyname)))
 	{
@@ -383,12 +383,12 @@
 	{
 		case 0x01: /* UNISTR */
 		{
-			init_buffer3_str(&value, tmp, strlen(tmp)+1);
+			init_rpc_blob_str(&value, tmp, strlen(tmp)+1);
 			break;
 		}
 		case 0x03: /* BYTES */
 		{
-			init_buffer3_hex(&value, tmp);
+			init_rpc_blob_hex(&value, tmp);
 			break;
 		}
 		case 0x04: /* DWORD */
@@ -402,7 +402,7 @@
 			{
 				tmp_val = strtol(tmp, (char**)NULL, 10);
 			}
-			init_buffer3_uint32(&value, tmp_val);
+			init_rpc_blob_uint32(&value, tmp_val);
 			break;
 		}
 		default:
@@ -434,7 +434,7 @@
 	}
 
 	/* create an entry */
-	res4 = res3 ? do_reg_create_val(smb_cli, &parent_pol,
+	res4 = res3 ? do_reg_set_val(smb_cli, &parent_pol,
 				 val_name, val_type, &value) : False;
 
 	/* flush the modified key */
@@ -454,12 +454,12 @@
 
 	if (res && res3 && res4)
 	{
-		DEBUG(5,("cmd_reg_create_val: query succeeded\n"));
+		DEBUG(5,("cmd_reg_set_val: query succeeded\n"));
 		fprintf(out_hnd,"OK\n");
 	}
 	else
 	{
-		DEBUG(5,("cmd_reg_create_val: query failed\n"));
+		DEBUG(5,("cmd_reg_set_val: query failed\n"));
 	}
 }
 
@@ -988,7 +988,7 @@
 	{ "regqueryval",	cmd_reg_query_info,		"Registry Value Query", "<valname>" },
 	{ "regquerykey",	cmd_reg_query_key,		"Registry Key Query", "<keyname>" },
 	{ "regdeleteval",	cmd_reg_delete_val,		"Registry Value Delete", "<valname>" },
-	{ "regcreateval",	cmd_reg_create_val,		"Registry Key Create", "<valname> <valtype> <value>" },
+	{ "regsetval",	        cmd_reg_set_val,		"Registry Key Create", "<valname> <valtype> <value>" },
 	{ "reggetsec",		cmd_reg_get_key_sec,		"Registry Key Security", "<keyname>" },
 	{ "regtestsec",		cmd_reg_test_key_sec,		"Test Registry Key Security", "<keyname>" },
 #endif



More information about the samba-cvs mailing list