[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-4-53-g5d2d94b

Karolin Seeger kseeger at samba.org
Wed Oct 15 17:18:41 GMT 2008


The branch, v3-2-stable has been updated
       via  5d2d94b46bd2ab03e2f83036b4d7fa3e401c3458 (commit)
       via  9953885d0be6a2477f5fd29940f3f1d6a7136cf4 (commit)
       via  abfdb52b60e84980d22e6c6c3479e67e20311b12 (commit)
       via  9222fde6505deb31324b507d73c96bcb6edb161d (commit)
       via  e9359e6e8f692c693aad95f9a241c41cc23aa02a (commit)
       via  41b2199fd87598076a1f45106b512c94042f7968 (commit)
       via  916bb3a8dc1ab23e416508cc2ed7a5791540e622 (commit)
       via  f5f7ed4041ef986a5ce208d59bbf39d34373ce71 (commit)
       via  69de2806465742ea6f1ea96d75d2cb3be6b84284 (commit)
       via  98bcd52a568c274707cc6ccb9071d07a8bfca1ca (commit)
       via  3f4cdabc965f824b70891f6a6bcb29e5f9b579e5 (commit)
       via  15b2f1d8744d157b131a0441e8738d8519de37c7 (commit)
       via  ed955214133c264865d2f6ca532349f0c1ea8d4b (commit)
       via  fa3096b975de2c7fd747ca9f344e36c911e27a9c (commit)
       via  82a086fb6f70dd6b725e4976293bc377a6a90f3a (commit)
       via  b1bcaf45ce14108b7e2b429b96908e30bf6eb90d (commit)
      from  ecc67001315111493738e893917c4550be7828a1 (commit)

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


- Log -----------------------------------------------------------------
commit 5d2d94b46bd2ab03e2f83036b4d7fa3e401c3458
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Oct 14 16:05:00 2008 -0700

    Attempt to fix bug #5818 - "smbcacls: sorts ACEs improperly and loses inheritance", based on
    a patch from Paul Fertser <fercerpav at gmail.com>. I also added the ability to get/set hex
    and symbolic inheritance flag names on ACE flags. I'm still investigating the effects
    of setting the "SEC_DESC_DACL_AUTO_INHERIT_REQ" flag as I don't yet see what effects
    this is having on the ACE sent.
    Jeremy.
    (cherry picked from commit e59a21e945e6336f3d7622bf77cf5c2304936b70)

commit 9953885d0be6a2477f5fd29940f3f1d6a7136cf4
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Oct 14 15:40:44 2008 -0700

    Note url explaining this code.
    Jeremy.
    (cherry picked from commit 4f1cdfe0901f4c78dff56ae5c26d2801b97d50d5)

commit abfdb52b60e84980d22e6c6c3479e67e20311b12
Author: Holger Hetterich <hhetter at novell.com>
Date:   Tue Oct 14 11:37:41 2008 -0700

    Fix the "Premature end of data in tag" error when buiding the manpage, fix a typo in the text, add an example for anonymization usage.
    (cherry picked from commit 1d202a8a7bccc65e47fc78b17d89b7e74a358487)

commit 9222fde6505deb31324b507d73c96bcb6edb161d
Author: Holger Hetterich <hhetter at novell.com>
Date:   Mon Oct 13 14:18:54 2008 -0700

    Update the manpage for vfs_smb_traffic_analyzer to include the anonymize_prefix option
    (cherry picked from commit c67cf648331bf4b8268813cb005b7283dd65eb73)

commit e9359e6e8f692c693aad95f9a241c41cc23aa02a
Author: Holger Hetterich <hhetter at novell.com>
Date:   Mon Oct 13 14:14:25 2008 -0700

    Enable optional anonymization of user names,
    if the configuration parameter anonymization_prefix is defined in
    smb.conf, and use the prefix given there.
    (cherry picked from commit 86a621a1a3e08bad8a0b276d8444f1f69a500385)

commit 41b2199fd87598076a1f45106b512c94042f7968
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Oct 7 21:24:25 2008 +0200

    Fix bug 5691: SIGBUS on Solaris
    (cherry picked from commit 0f3f34033a80e44fa18cae452a164e445392138a)

commit 916bb3a8dc1ab23e416508cc2ed7a5791540e622
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Oct 12 10:41:29 2008 +0200

    Fix the build
    (cherry picked from commit 1ab2a5b958a900a078cadf98b83fba7fadbaedf9)

commit f5f7ed4041ef986a5ce208d59bbf39d34373ce71
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 10 17:25:44 2008 -0700

    Now it's working, back port the aync fix for parsing large cups printer lists.
    Jeremy.
    (cherry picked from commit 48ee5a66d18b805d03f93c85e98a41374d82cfb9)

commit 69de2806465742ea6f1ea96d75d2cb3be6b84284
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Oct 9 17:22:59 2008 +0200

    Make use of ZERO_STRUCT (the first memset was actually wrong)
    (cherry picked from commit e42477caece1a2e861aa0698d2e06847819f0b0d)

commit 98bcd52a568c274707cc6ccb9071d07a8bfca1ca
Author: Jeff Layton <jlayton at redhat.com>
Date:   Thu Oct 9 10:44:37 2008 -0400

    mount.cifs: make return codes match the return codes for /bin/mount (try #3)
    
    The manpage for /bin/mount specifies that the return code should be a
    positive integer (actually, it's a bitfield). Clean up the return
    codes from mount.cifs to make them match the expected return values
    from /bin/mount. This necessary for proper integration with autofs.
    
    This is the third attempt at this patch. The changes here are minor,
    just changing some return's from main() into exit() calls for
    consistency's sake.
    
    Signed-off-by: Jeff Layton <jlayton at redhat.com>
    (cherry picked from commit 2374799c8114ae3ed422d1cbe4ca12c4fd075274)

commit 3f4cdabc965f824b70891f6a6bcb29e5f9b579e5
Author: Jeff Layton <jlayton at redhat.com>
Date:   Thu Oct 9 10:42:28 2008 -0400

    mount.cifs: have uppercase_string return success on NULL pointer
    
    We currently don't attempt to uppercase the device portion of the mount
    string if there isn't a prefixpath. Fix that by making uppercase_string
    return success without doing anything on a NULL pointer.
    
    Signed-off-by: Jeff Layton <jlayton at redhat.com>
    (cherry picked from commit 34b5cfe8a0cb8674da0c5ac7d81b6e64160ccaa2)

commit 15b2f1d8744d157b131a0441e8738d8519de37c7
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Oct 8 11:40:16 2008 -0700

    Fix bug #5814 - Winbindd dumping core in a strange manner while doing "rescan_trusted_domain".
    From analysis by hargagan <shargagan at novell.com> :
    "The winbindd_child_died() is also getting called from process_loop() in case of
    SIGCHLD signal. In this case it doesn't make the timeout_handler to NULL for
    the first request. It then initiate a new request using
    schedule_async_request() which installs a new timeout handler for the same
    request. In such a case, for a badly unresponsive system both the timeout
    handler can be called. For the first call the "private_data" will be cleared
    and for another call the timeout handler will be detecting the double free. So,
    for such a case as well, the winbindd_child_died() should make the
    timeout_handler to NULL."
    Jeremy.
    (cherry picked from commit ce8de496ec139b7a56db20c5ffbcbdc2f4db0a51)

commit ed955214133c264865d2f6ca532349f0c1ea8d4b
Author: Tim Prouty <tim.prouty at isilon.com>
Date:   Tue Oct 7 10:30:22 2008 -0700

    Fixed build warning "passing arg from incompatible pointer type"
    
    The fix explicitly makes the conversion from timeval to time_t using the
    existing time utility functions.
    
    Compiling modules/vfs_smb_traffic_analyzer.c
    modules/vfs_smb_traffic_analyzer.c: In function `smb_traffic_analyzer_send_data':
    modules/vfs_smb_traffic_analyzer.c:173: warning: passing arg 1 of `localtime' from incompatible pointer type
    (cherry picked from commit 22852666ddf3e77404373042ceecb19747ae25cd)

commit fa3096b975de2c7fd747ca9f344e36c911e27a9c
Author: Tim Prouty <tim.prouty at isilon.com>
Date:   Tue Oct 7 10:13:51 2008 -0700

    Fixed "declaration shadows global declaration" warnings.
    
    The patch simply uses a more descriptive variable name for tcp_seq.
    
    lib/socket_wrapper/socket_wrapper.c:753: warning: declaration of 'tcp_seq' shadows a global declaration
    /usr/include/netinet/tcp.h:40: warning: shadowed declaration is here
    lib/socket_wrapper/socket_wrapper.c: In function `swrap_marshall_packet':
    lib/socket_wrapper/socket_wrapper.c:919: warning: declaration of 'tcp_seq' shadows a global declaration
    /usr/include/netinet/tcp.h:40: warning: shadowed declaration is here
    (cherry picked from commit 03cbea1d653c716b16347c831aa56dca0eb297ab)

commit 82a086fb6f70dd6b725e4976293bc377a6a90f3a
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Oct 6 14:10:23 2008 -0700

    If name_to_fqdn fails, retry with the dns domain the DC gave us
    
    This is a workaround for the cases where you want to join under a netbios name
    that is different from your hostname, i.e. a name that can not be found in
    /etc/hosts or dns. In these cases, name_to_fqdn fails or gives invalid results.
    (cherry picked from commit 84951b54bc1473aa9275c02cc37a9f0d7d4150e2)

commit b1bcaf45ce14108b7e2b429b96908e30bf6eb90d
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Oct 6 14:10:10 2008 -0700

    Log in the parent winbind log where a request is going
    (cherry picked from commit f63bac521f0595ccbcf687678e325649f3e0e5e3)

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

Summary of changes:
 docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml |   25 ++-
 source/client/mount.cifs.c                         |   86 ++++---
 source/include/smb.h                               |    1 +
 source/lib/dummysmbd.c                             |   10 +
 source/lib/socket_wrapper/socket_wrapper.c         |   38 ++--
 source/libnet/libnet_join.c                        |   11 +-
 source/modules/vfs_gpfs.c                          |    6 +-
 source/modules/vfs_smb_traffic_analyzer.c          |   25 ++-
 source/param/loadparm.c                            |    2 +-
 source/printing/load.c                             |    2 +-
 source/printing/pcap.c                             |   77 ++++--
 source/printing/print_cups.c                       |  262 +++++++++++++++++++-
 source/smbd/posix_acls.c                           |    4 +
 source/smbd/session.c                              |    5 +-
 source/utils/smbcacls.c                            |  183 ++++++++++++--
 source/winbindd/winbindd_dual.c                    |   27 ++
 16 files changed, 637 insertions(+), 127 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml b/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml
index c0b1ef8..a12f44b 100644
--- a/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml
+++ b/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml
@@ -103,7 +103,15 @@
 		<term>smb_traffic_analyzer:port = STRING</term>
 		<listitem>
 		<para>The module will send the data using the TCP port given
-		in STRING
+		in STRING.
+		</para>
+		</listitem>
+		</varlistentry>
+		<varlistentry>
+		<term>smb_traffic_analyzer:anonymize_prefix = STRING</term>
+		<listitem>
+		<para>The module will replace the user names with a prefix
+		given by STRING and a simple hash number.
 		</para>
 
 		</listitem>
@@ -124,16 +132,27 @@
 	<smbconfoption name="smb_traffic_analyzer:mode">unix_domain_socket</smbconfoption>
 	</programlisting>
 
-	<para>The module running on share "example_share", using an internet domain socket,
+	<para>The module running on share "example_share", using an internet socket,
 	connecting to host "examplehost" on port 3491.</para>
 	<programlisting>
 	<smbconfsection name="[example_share]"/>
 	<smbconfoption name="path">/data/example</smbconfoption>
 	<smbconfoption name="vfs objects">smb_traffic_analyzer</smbconfoption>
 	<smbconfoption name="smb_traffic_analyzer:host">examplehost</smbconfoption>
-	<smbconfoption name="smb_traffic_analyzer:port">3490</smbconfoption>
+	<smbconfoption name="smb_traffic_analyzer:port">3491</smbconfoption>
 	</programlisting>
 
+	<para>The module running on share "example_share", using an internet socket,
+	connecting to host "examplehost" on port 3491, anonymizing user names with
+	the prefix "User".</para>
+	<programlisting>
+	<smbconfsection name="[example_share]"/>
+	<smbconfoption name="path">/data/example</smbconfoption>
+	<smbconfoption name="vfs objects">smb_traffic_analyzer</smbconfoption>
+	<smbconfoption name="smb_traffic_analyzer:host">examplehost</smbconfoption>
+	<smbconfoption name="smb_traffic_analyzer:port">3491</smbconfoption>
+	<smbconfoption name="smb_traffic_analyzer:anonymize_prefix">User</smbconfoption>
+	</programlisting>
 </refsect1>
 
 <refsect1>
diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index 56778dd..9278295 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -79,6 +79,15 @@
 #define MOUNT_PASSWD_SIZE 64
 #define DOMAIN_SIZE 64
 
+/* exit status - bits below are ORed */
+#define EX_USAGE        1       /* incorrect invocation or permission */
+#define EX_SYSERR       2       /* out of memory, cannot fork, ... */
+#define EX_SOFTWARE     4       /* internal mount bug or wrong version */
+#define EX_USER         8       /* user interrupt */
+#define EX_FILEIO      16       /* problems writing, locking, ... mtab/fstab */
+#define EX_FAIL        32       /* mount failure */
+#define EX_SOMEOK      64       /* some mount succeeded */
+
 const char *thisprogram;
 int verboseflag = 0;
 static int got_password = 0;
@@ -174,7 +183,7 @@ static void mount_cifs_usage(void)
 	printf("\n\t%s -V\n",thisprogram);
 
 	SAFE_FREE(mountpassword);
-	exit(1);
+	exit(EX_USAGE);
 }
 
 /* caller frees username if necessary */
@@ -233,7 +242,7 @@ static int open_cred_file(char * file_name)
 				if(length > 4086) {
 					printf("mount.cifs failed due to malformed username in credentials file");
 					memset(line_buf,0,4096);
-					exit(1);
+					exit(EX_USAGE);
 				} else {
 					got_user = 1;
 					user_name = (char *)calloc(1 + length,1);
@@ -257,7 +266,7 @@ static int open_cred_file(char * file_name)
 				if(length > MOUNT_PASSWD_SIZE) {
 					printf("mount.cifs failed: password in credentials file too long\n");
 					memset(line_buf,0, 4096);
-					exit(1);
+					exit(EX_USAGE);
 				} else {
 					if(mountpassword == NULL) {
 						mountpassword = (char *)calloc(MOUNT_PASSWD_SIZE+1,1);
@@ -285,7 +294,7 @@ static int open_cred_file(char * file_name)
                                 }
                                 if(length > DOMAIN_SIZE) {
                                         printf("mount.cifs failed: domain in credentials file too long\n");
-                                        exit(1);
+                                        exit(EX_USAGE);
                                 } else {
                                         if(domain_name == NULL) {
                                                 domain_name = (char *)calloc(DOMAIN_SIZE+1,1);
@@ -318,7 +327,7 @@ static int get_password_from_file(int file_descript, char * filename)
 
 	if (mountpassword == NULL) {
 		printf("malloc failed\n");
-		exit(1);
+		exit(EX_SYSERR);
 	}
 
 	if(filename != NULL) {
@@ -326,7 +335,7 @@ static int get_password_from_file(int file_descript, char * filename)
 		if(file_descript < 0) {
 			printf("mount.cifs failed. %s attempting to open password file %s\n",
 				   strerror(errno),filename);
-			exit(1);
+			exit(EX_SYSERR);
 		}
 	}
 	/* else file already open and fd provided */
@@ -337,7 +346,7 @@ static int get_password_from_file(int file_descript, char * filename)
 			printf("mount.cifs failed. Error %s reading password file\n",strerror(errno));
 			if(filename != NULL)
 				close(file_descript);
-			exit(1);
+			exit(EX_SYSERR);
 		} else if(rc == 0) {
 			if(mountpassword[0] == 0) {
 				if(verboseflag)
@@ -559,7 +568,7 @@ static int parse_options(char ** optionsp, int * filesys_flags)
 
 					if (!(pw = getpwnam(value))) {
 						printf("bad user name \"%s\"\n", value);
-						exit(1);
+						exit(EX_USAGE);
 					}
 					snprintf(user, sizeof(user), "%u", pw->pw_uid);
 				} else {
@@ -575,7 +584,7 @@ static int parse_options(char ** optionsp, int * filesys_flags)
 
 					if (!(gr = getgrnam(value))) {
 						printf("bad group name \"%s\"\n", value);
-						exit(1);
+						exit(EX_USAGE);
 					}
 					snprintf(group, sizeof(group), "%u", gr->gr_gid);
 				} else {
@@ -670,7 +679,7 @@ static int parse_options(char ** optionsp, int * filesys_flags)
 		out = (char *)realloc(out, out_len + word_len + 2);
 		if (out == NULL) {
 			perror("malloc");
-			exit(1);
+			exit(EX_SYSERR);
 		}
 
 		if (out_len) {
@@ -695,7 +704,7 @@ nocopy:
 		out = (char *)realloc(out, out_len + word_len + 6);
 		if (out == NULL) {
 			perror("malloc");
-			exit(1);
+			exit(EX_SYSERR);
 		}
 
 		if (out_len) {
@@ -711,7 +720,7 @@ nocopy:
 		out = (char *)realloc(out, out_len + 1 + word_len + 6);
 		if (out == NULL) {
 		perror("malloc");
-			exit(1);
+			exit(EX_SYSERR);
 		}
 
 		if (out_len) {
@@ -992,12 +1001,12 @@ static struct option longopts[] = {
 };
 
 /* convert a string to uppercase. return false if the string
- * wasn't ASCII or was a NULL ptr */
+ * wasn't ASCII. Return success on a NULL ptr */
 static int
 uppercase_string(char *string)
 {
 	if (!string)
-		return 0;
+		return 1;
 
 	while (*string) {
 		/* check for unicode */
@@ -1046,7 +1055,7 @@ int main(int argc, char ** argv)
 		thisprogram = argv[0];
 	} else {
 		mount_cifs_usage();
-		exit(1);
+		exit(EX_USAGE);
 	}
 
 	if(thisprogram == NULL)
@@ -1063,12 +1072,12 @@ int main(int argc, char ** argv)
 		share_name = strndup(argv[1], MAX_UNC_LEN);
 		if (share_name == NULL) {
 			fprintf(stderr, "%s: %s", argv[0], strerror(ENOMEM));
-			exit(1);
+			exit(EX_SYSERR);
 		}
 		mountpoint = argv[2];
 	} else {
 		mount_cifs_usage();
-		exit(1);
+		exit(EX_USAGE);
 	}
 
 	/* add sharename in opts string as unc= parm */
@@ -1090,7 +1099,7 @@ int main(int argc, char ** argv)
 		case '?':
 		case 'h':	 /* help */
 			mount_cifs_usage ();
-			exit(1);
+			exit(EX_USAGE);
 		case 'n':
 		    ++nomtab;
 		    break;
@@ -1144,14 +1153,14 @@ int main(int argc, char ** argv)
 				uid = strtoul(optarg, &ep, 10);
 				if (*ep) {
 					printf("bad uid value \"%s\"\n", optarg);
-					exit(1);
+					exit(EX_USAGE);
 				}
 			} else {
 				struct passwd *pw;
 
 				if (!(pw = getpwnam(optarg))) {
 					printf("bad user name \"%s\"\n", optarg);
-					exit(1);
+					exit(EX_USAGE);
 				}
 				uid = pw->pw_uid;
 				endpwent();
@@ -1164,14 +1173,14 @@ int main(int argc, char ** argv)
 				gid = strtoul(optarg, &ep, 10);
 				if (*ep) {
 					printf("bad gid value \"%s\"\n", optarg);
-					exit(1);
+					exit(EX_USAGE);
 				}
 			} else {
 				struct group *gr;
 
 				if (!(gr = getgrnam(optarg))) {
 					printf("bad user name \"%s\"\n", optarg);
-					exit(1);
+					exit(EX_USAGE);
 				}
 				gid = gr->gr_gid;
 				endpwent();
@@ -1201,13 +1210,13 @@ int main(int argc, char ** argv)
 		default:
 			printf("unknown mount option %c\n",c);
 			mount_cifs_usage();
-			exit(1);
+			exit(EX_USAGE);
 		}
 	}
 
 	if((argc < 3) || (dev_name == NULL) || (mountpoint == NULL)) {
 		mount_cifs_usage();
-		exit(1);
+		exit(EX_USAGE);
 	}
 
 	if (getenv("PASSWD")) {
@@ -1224,13 +1233,13 @@ int main(int argc, char ** argv)
 	}
 
         if (orgoptions && parse_options(&orgoptions, &flags)) {
-                rc = -1;
+                rc = EX_USAGE;
 		goto mount_exit;
 	}
 	ipaddr = parse_server(&share_name);
 	if((ipaddr == NULL) && (got_ip == 0)) {
 		printf("No ip address specified and hostname not found\n");
-		rc = -1;
+		rc = EX_USAGE;
 		goto mount_exit;
 	}
 	
@@ -1245,19 +1254,19 @@ int main(int argc, char ** argv)
 	}
 	if(chdir(mountpoint)) {
 		printf("mount error: can not change directory into mount target %s\n",mountpoint);
-		rc = -1;
+		rc = EX_USAGE;
 		goto mount_exit;
 	}
 
 	if(stat (".", &statbuf)) {
 		printf("mount error: mount point %s does not exist\n",mountpoint);
-		rc = -1;
+		rc = EX_USAGE;
 		goto mount_exit;
 	}
 
 	if (S_ISDIR(statbuf.st_mode) == 0) {
 		printf("mount error: mount point %s is not a directory\n",mountpoint);
-		rc = -1;
+		rc = EX_USAGE;
 		goto mount_exit;
 	}
 
@@ -1270,7 +1279,7 @@ int main(int argc, char ** argv)
 #endif						
 		} else {
 			printf("mount error: permission denied or not superuser and mount.cifs not installed SUID\n"); 
-			return -1;
+			exit(EX_USAGE);
 		}
 	}
 
@@ -1285,7 +1294,7 @@ int main(int argc, char ** argv)
 		mountpassword = (char *)calloc(MOUNT_PASSWD_SIZE+1,1);
 		if (!tmp_pass || !mountpassword) {
 			printf("Password not entered, exiting\n");
-			return -1;
+			exit(EX_USAGE);
 		}
 		strlcpy(mountpassword, tmp_pass, MOUNT_PASSWD_SIZE+1);
 		got_password = 1;
@@ -1303,7 +1312,7 @@ mount_retry:
 	else {
 		printf("No server share name specified\n");
 		printf("\nMounting the DFS root for server not implemented yet\n");
-                exit(1);
+                exit(EX_USAGE);
 	}
 	if(user_name)
 		optlen += strlen(user_name) + 6;
@@ -1317,7 +1326,7 @@ mount_retry:
 
 	if(options == NULL) {
 		printf("Could not allocate memory for mount options\n");
-		return -1;
+		exit(EX_SYSERR);
 	}
 
 	options[0] = 0;
@@ -1396,8 +1405,7 @@ mount_retry:
 			printf("mount error %d = %s\n",errno,strerror(errno));
 		}
 		printf("Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)\n");
-		rc = -1;
-		goto mount_exit;
+		rc = EX_FAIL;
 	} else {
 		pmntfile = setmntent(MOUNTED, "a+");
 		if(pmntfile) {
@@ -1435,11 +1443,13 @@ mount_retry:
 			rc = addmntent(pmntfile,&mountent);
 			endmntent(pmntfile);
 			SAFE_FREE(mountent.mnt_opts);
+			if (rc)
+				rc = EX_FILEIO;
 		} else {
-		    printf("could not update mount table\n");
+			printf("could not update mount table\n");
+			rc = EX_FILEIO;
 		}
 	}
-	rc = 0;
 mount_exit:
 	if(mountpassword) {
 		int len = strlen(mountpassword);
@@ -1451,5 +1461,5 @@ mount_exit:
 	SAFE_FREE(orgoptions);
 	SAFE_FREE(resolved_path);
 	SAFE_FREE(share_name);
-	return rc;
+	exit(rc);
 }
diff --git a/source/include/smb.h b/source/include/smb.h
index 3c7058f..bfada11 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -422,6 +422,7 @@ struct idle_event;
 struct share_mode_entry;
 struct uuid;
 struct named_mutex;
+struct pcap_cache;
 
 struct vfs_fsp_data {
     struct vfs_fsp_data *next;
diff --git a/source/lib/dummysmbd.c b/source/lib/dummysmbd.c
index dbe886e..a9ba2f2 100644
--- a/source/lib/dummysmbd.c
+++ b/source/lib/dummysmbd.c
@@ -51,3 +51,13 @@ NTSTATUS can_delete_directory(struct connection_struct *conn,
 {
 	return NT_STATUS_OK;
 }
+
+struct event_context *smbd_event_context(void)
+{
+        return NULL;
+}
+
+struct messaging_context *smbd_messaging_context(void)
+{
+        return NULL;
+}
diff --git a/source/lib/socket_wrapper/socket_wrapper.c b/source/lib/socket_wrapper/socket_wrapper.c
index c0a7c16..ebb0639 100644
--- a/source/lib/socket_wrapper/socket_wrapper.c
+++ b/source/lib/socket_wrapper/socket_wrapper.c
@@ -625,7 +625,7 @@ static struct swrap_packet *swrap_packet_init(struct timeval *tval,
 					      int socket_type,
 					      const unsigned char *payload,
 					      size_t payload_len,
-					      unsigned long tcp_seq,
+					      unsigned long tcp_seqno,
 					      unsigned long tcp_ack,
 					      unsigned char tcp_ctl,
 					      int unreachable,
@@ -724,7 +724,7 @@ static struct swrap_packet *swrap_packet_init(struct timeval *tval,
 	case SOCK_STREAM:
 		packet->ip.p.tcp.source_port	= src_port;
 		packet->ip.p.tcp.dest_port	= dest_port;
-		packet->ip.p.tcp.seq_num	= htonl(tcp_seq);
+		packet->ip.p.tcp.seq_num	= htonl(tcp_seqno);
 		packet->ip.p.tcp.ack_num	= htonl(tcp_ack);
 		packet->ip.p.tcp.hdr_length	= 0x50; /* 5 * 32 bit words */
 		packet->ip.p.tcp.control	= tcp_ctl;
@@ -787,7 +787,7 @@ static void swrap_dump_packet(struct socket_info *si, const struct sockaddr *add
 	const struct sockaddr_in *src_addr;
 	const struct sockaddr_in *dest_addr;
 	const char *file_name;
-	unsigned long tcp_seq = 0;
+	unsigned long tcp_seqno = 0;
 	unsigned long tcp_ack = 0;
 	unsigned char tcp_ctl = 0;
 	int unreachable = 0;
@@ -812,7 +812,7 @@ static void swrap_dump_packet(struct socket_info *si, const struct sockaddr *add
 		src_addr = (const struct sockaddr_in *)si->myname;
 		dest_addr = (const struct sockaddr_in *)addr;
 
-		tcp_seq = si->io.pck_snd;
+		tcp_seqno = si->io.pck_snd;
 		tcp_ack = si->io.pck_rcv;
 		tcp_ctl = 0x02; /* SYN */
 
@@ -826,7 +826,7 @@ static void swrap_dump_packet(struct socket_info *si, const struct sockaddr *add
 		dest_addr = (const struct sockaddr_in *)si->myname;
 		src_addr = (const struct sockaddr_in *)addr;
 
-		tcp_seq = si->io.pck_rcv;
+		tcp_seqno = si->io.pck_rcv;
 		tcp_ack = si->io.pck_snd;
 		tcp_ctl = 0x12; /** SYN,ACK */
 
@@ -841,7 +841,7 @@ static void swrap_dump_packet(struct socket_info *si, const struct sockaddr *add
 		src_addr = (const struct sockaddr_in *)addr;
 
 		/* Unreachable: resend the data of SWRAP_CONNECT_SEND */
-		tcp_seq = si->io.pck_snd - 1;
+		tcp_seqno = si->io.pck_snd - 1;
 		tcp_ack = si->io.pck_rcv;
 		tcp_ctl = 0x02; /* SYN */
 		unreachable = 1;
@@ -854,7 +854,7 @@ static void swrap_dump_packet(struct socket_info *si, const struct sockaddr *add
 		src_addr = (const struct sockaddr_in *)si->myname;
 		dest_addr = (const struct sockaddr_in *)addr;
 
-		tcp_seq = si->io.pck_snd;
+		tcp_seqno = si->io.pck_snd;
 		tcp_ack = si->io.pck_rcv;
 		tcp_ctl = 0x10; /* ACK */
 
@@ -866,7 +866,7 @@ static void swrap_dump_packet(struct socket_info *si, const struct sockaddr *add
 		dest_addr = (const struct sockaddr_in *)si->myname;
 		src_addr = (const struct sockaddr_in *)addr;
 
-		tcp_seq = si->io.pck_rcv;
+		tcp_seqno = si->io.pck_rcv;
 		tcp_ack = si->io.pck_snd;
 		tcp_ctl = 0x02; /* SYN */
 
@@ -880,7 +880,7 @@ static void swrap_dump_packet(struct socket_info *si, const struct sockaddr *add
 		src_addr = (const struct sockaddr_in *)si->myname;
 		dest_addr = (const struct sockaddr_in *)addr;
 
-		tcp_seq = si->io.pck_snd;
+		tcp_seqno = si->io.pck_snd;
 		tcp_ack = si->io.pck_rcv;
 		tcp_ctl = 0x12; /* SYN,ACK */
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list