[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-2568-g8b926d5

Jeremy Allison jra at samba.org
Thu May 22 23:23:41 GMT 2008


The branch, v3-3-test has been updated
       via  8b926d5a93d04b828990057ae6f1e090764305c1 (commit)
       via  a65abb49cf8d291c7deb659912c0df34ec37da02 (commit)
       via  1078b5c53ae9d6f9532eecebf9cf4a1712200b7e (commit)
      from  2281274480d8cf9e773874301dbbc7bf06346901 (commit)

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


- Log -----------------------------------------------------------------
commit 8b926d5a93d04b828990057ae6f1e090764305c1
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 22 16:23:07 2008 -0700

    Remove MAX_SESS_ENTRIES and MAX_CONN_ENTRIES limits
    as they are no longer needed now we have IDL marshalling.
    Change the calculation of the 32-bit fileid we return
    to a Windows client. We can't just use the generation
    count as it starts at zero for every smbd - and this
    command must enumerate all files open across all smbds.
    We'd really like combination of process-id + dev + inode +
    generation count to be unique, but as we can't fit that
    into 32 bits just use 16 bits of pid + generation count.
    Jeremy.

commit a65abb49cf8d291c7deb659912c0df34ec37da02
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 22 16:20:25 2008 -0700

    Revert "Arggh. Got the path/user the wrong way around. IDL is correct :-)."
    
    This reverts commit 1078b5c53ae9d6f9532eecebf9cf4a1712200b7e.
    
    This message doesn't match the actual change.

commit 1078b5c53ae9d6f9532eecebf9cf4a1712200b7e
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 22 16:19:26 2008 -0700

    Arggh. Got the path/user the wrong way around. IDL is correct :-).
    Jeremy.

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

Summary of changes:
 source/rpc_server/srv_srvsvc_nt.c |   25 ++++++-------------------
 1 files changed, 6 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/rpc_server/srv_srvsvc_nt.c b/source/rpc_server/srv_srvsvc_nt.c
index ebbc39c..9ffe9a5 100644
--- a/source/rpc_server/srv_srvsvc_nt.c
+++ b/source/rpc_server/srv_srvsvc_nt.c
@@ -32,19 +32,6 @@ extern const struct generic_mapping file_generic_mapping;
 
 #define MAX_SERVER_DISK_ENTRIES 15
 
-/***************************/
-
-/* oops - this is going to take up a *massive* amount of stack. */
-/* the UNISTR2s already have 1024 uint16 chars in them... */
-
-#define MAX_SESS_ENTRIES 32
-
-/***************************/
-
-/* oops - this is going to take up a *massive* amount of stack. */
-/* the UNISTR2s already have 1024 uint16 chars in them... */
-#define MAX_CONN_ENTRIES 32
-
 /* Use for enumerating connections, pipes, & files */
 
 struct file_enum_count {
@@ -102,7 +89,7 @@ static int pipe_enum_fn( struct db_record *rec, void *p)
 	fenum->ctr3->array = f;
 
 	init_srvsvc_NetFileInfo3(&fenum->ctr3->array[i],
-				 (uint32_t)((procid_to_pid(&prec.pid)<<16) & prec.pnum),
+				 (((uint32_t)(procid_to_pid(&prec.pid))<<16) | prec.pnum),
 				 (FILE_READ_DATA|FILE_WRITE_DATA),
 				 0,
 				 fullpath,
@@ -204,7 +191,7 @@ static void enum_file_fn( const struct share_mode_entry *e,
 
 	/* now fill in the srvsvc_NetFileInfo3 struct */
 	init_srvsvc_NetFileInfo3(&fenum->ctr3->array[i],
-				 e->share_file_id,
+				 (((uint32_t)(procid_to_pid(&e->pid))<<16) | e->share_file_id),
 				 permissions,
 				 num_locks,
 				 fullpath,
@@ -748,7 +735,7 @@ static WERROR init_srv_sess_info_0(pipes_struct *p,
 		return WERR_OK;
 	}
 
-	for (; resume_handle < *total_entries && num_entries < MAX_SESS_ENTRIES; resume_handle++) {
+	for (; resume_handle < *total_entries; resume_handle++) {
 
 		ctr0->array = TALLOC_REALLOC_ARRAY(p->mem_ctx,
 						   ctr0->array,
@@ -831,7 +818,7 @@ static WERROR init_srv_sess_info_1(pipes_struct *p,
 
 	*total_entries = list_sessions(p->mem_ctx, &session_list);
 
-	for (; resume_handle < *total_entries && num_entries < MAX_SESS_ENTRIES; resume_handle++) {
+	for (; resume_handle < *total_entries; resume_handle++) {
 		uint32 num_files;
 		uint32 connect_time;
 		struct passwd *pw = sys_getpwnam(session_list[resume_handle].username);
@@ -900,7 +887,7 @@ static WERROR init_srv_conn_info_0(struct srvsvc_NetConnCtr0 *ctr0,
 
 	ZERO_STRUCTP(ctr0);
 
-	for (; resume_handle < *total_entries && num_entries < MAX_CONN_ENTRIES; resume_handle++) {
+	for (; resume_handle < *total_entries; resume_handle++) {
 
 		ctr0->array = TALLOC_REALLOC_ARRAY(talloc_tos(),
 						   ctr0->array,
@@ -955,7 +942,7 @@ static WERROR init_srv_conn_info_1(struct srvsvc_NetConnCtr1 *ctr1,
 
 	ZERO_STRUCTP(ctr1);
 
-	for (; (resume_handle < *total_entries) && num_entries < MAX_CONN_ENTRIES; resume_handle++) {
+	for (; resume_handle < *total_entries; resume_handle++) {
 
 		ctr1->array = TALLOC_REALLOC_ARRAY(talloc_tos(),
 						   ctr1->array,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list