[SCM] Samba Shared Repository - branch v3-6-test updated

Günther Deschner gd at samba.org
Mon May 16 07:34:57 MDT 2011


The branch, v3-6-test has been updated
       via  3bcdab2 s3-spoolss: remove another unused header.
       via  bbe4e6d s3-util: move valid_share_pathname() to lib/util.c
      from  c6e4a26 s3-rpc_server: remove proto of nonexisting function (rpc_pipe_register_commands).

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 3bcdab23d9e1304e9a0b306c673107907f2e8307
Author: Günther Deschner <gd at samba.org>
Date:   Mon May 2 13:25:19 2011 +0200

    s3-spoolss: remove another unused header.
    
    Guenther
    (cherry picked from commit 1a561dedb9995f52411d2fed2c6e0cc1e37a85d1)

commit bbe4e6d975e7b47179572f103d41d95d1cab6edf
Author: Günther Deschner <gd at samba.org>
Date:   Fri Apr 29 22:34:56 2011 +0200

    s3-util: move valid_share_pathname() to lib/util.c
    
    Guenther
    (cherry picked from commit c1f3ff734043082a9488c787324e76a37702f94d)

-----------------------------------------------------------------------

Summary of changes:
 source3/include/proto.h                       |    5 +---
 source3/lib/util.c                            |   34 +++++++++++++++++++++++++
 source3/rpc_server/spoolss/srv_spoolss_util.c |    1 -
 source3/rpc_server/srvsvc/srv_srvsvc_nt.c     |   34 -------------------------
 4 files changed, 35 insertions(+), 39 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index a8b674b..157a4ab 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -712,6 +712,7 @@ bool tevent_req_poll_ntstatus(struct tevent_req *req,
 			      NTSTATUS *status);
 bool any_nt_status_not_ok(NTSTATUS err1, NTSTATUS err2, NTSTATUS *result);
 int timeval_to_msec(struct timeval t);
+char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname);
 
 /* The following definitions come from lib/util_cmdline.c  */
 
@@ -2766,10 +2767,6 @@ void do_drv_upgrade_printer(struct messaging_context *msg,
 			    DATA_BLOB *data);
 void update_monitored_printq_cache(struct messaging_context *msg_ctx);
 
-/* The following definitions come from rpc_server/srv_srvsvc_nt.c  */
-
-char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname);
-
 /* The following definitions come from rpc_server/srv_svcctl_nt.c  */
 
 bool init_service_op_table( void );
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 69568ce..d39aace 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -2687,3 +2687,37 @@ int timeval_to_msec(struct timeval t)
 {
 	return t.tv_sec * 1000 + (t.tv_usec+999) / 1000;
 }
+
+/*******************************************************************
+ Check a given DOS pathname is valid for a share.
+********************************************************************/
+
+char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname)
+{
+	char *ptr = NULL;
+
+	if (!dos_pathname) {
+		return NULL;
+	}
+
+	ptr = talloc_strdup(ctx, dos_pathname);
+	if (!ptr) {
+		return NULL;
+	}
+	/* Convert any '\' paths to '/' */
+	unix_format(ptr);
+	ptr = unix_clean_name(ctx, ptr);
+	if (!ptr) {
+		return NULL;
+	}
+
+	/* NT is braindead - it wants a C: prefix to a pathname ! So strip it. */
+	if (strlen(ptr) > 2 && ptr[1] == ':' && ptr[0] != '/')
+		ptr += 2;
+
+	/* Only absolute paths allowed. */
+	if (*ptr != '/')
+		return NULL;
+
+	return ptr;
+}
diff --git a/source3/rpc_server/spoolss/srv_spoolss_util.c b/source3/rpc_server/spoolss/srv_spoolss_util.c
index 9e9e253..c8e96e0 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_util.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_util.c
@@ -23,7 +23,6 @@
 #include "nt_printing.h"
 #include "srv_spoolss_util.h"
 #include "../librpc/gen_ndr/ndr_spoolss.h"
-#include "../librpc/gen_ndr/srv_winreg.h"
 #include "../librpc/gen_ndr/ndr_winreg_c.h"
 #include "../librpc/gen_ndr/ndr_security.h"
 #include "secrets.h"
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index e51fee8..36f4c18 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -1513,40 +1513,6 @@ WERROR _srvsvc_NetShareGetInfo(struct pipes_struct *p,
 }
 
 /*******************************************************************
- Check a given DOS pathname is valid for a share.
-********************************************************************/
-
-char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname)
-{
-	char *ptr = NULL;
-
-	if (!dos_pathname) {
-		return NULL;
-	}
-
-	ptr = talloc_strdup(ctx, dos_pathname);
-	if (!ptr) {
-		return NULL;
-	}
-	/* Convert any '\' paths to '/' */
-	unix_format(ptr);
-	ptr = unix_clean_name(ctx, ptr);
-	if (!ptr) {
-		return NULL;
-	}
-
-	/* NT is braindead - it wants a C: prefix to a pathname ! So strip it. */
-	if (strlen(ptr) > 2 && ptr[1] == ':' && ptr[0] != '/')
-		ptr += 2;
-
-	/* Only absolute paths allowed. */
-	if (*ptr != '/')
-		return NULL;
-
-	return ptr;
-}
-
-/*******************************************************************
  _srvsvc_NetShareSetInfo. Modify share details.
 ********************************************************************/
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list