Resolve conflict of merging in J.Layton patch
authorSimo Sorce <idra@samba.org>
Mon, 17 Dec 2007 14:40:10 +0000 (09:40 -0500)
committerSimo Sorce <idra@samba.org>
Mon, 17 Dec 2007 14:40:10 +0000 (09:40 -0500)
Merge branch 'v3-0-test' of ssh://git.samba.org/data/git/samba into v3-0-simo

Conflicts:

source/client/mount.cifs.c

1  2 
source/client/mount.cifs.c

index 479379894ad5f8ae101e0c09d6b10c05717ea326,33da1a25d9280b7b7cda3f259aed15264043575d..3761adb2ec683e0137f1467cad1b7d1d3ba9498d
mode 100644,100755..100644
@@@ -1244,29 -1285,27 +1326,29 @@@ mount_retry
  /*            if(sep is not set)*/
                if(retry == 0)
                        check_for_comma(&mountpassword);
-               strncat(options,",pass=",6);
-               strcat(options,mountpassword);
+               strlcat(options,",pass=",options_size);
+               strlcat(options,mountpassword,options_size);
        }
  
-       strncat(options,",ver=",5);
-       strcat(options,MOUNT_CIFS_VERSION_MAJOR);
+       strlcat(options,",ver=",options_size);
+       strlcat(options,MOUNT_CIFS_VERSION_MAJOR,options_size);
  
        if(orgoptions) {
-               strcat(options,",");
-               strcat(options,orgoptions);
+               strlcat(options,",",options_size);
+               strlcat(options,orgoptions,options_size);
        }
        if(prefixpath) {
-               strncat(options,",prefixpath=",12);
-               strcat(options,prefixpath); /* no need to cat the / */
-       }       
+               strlcat(options,",prefixpath=",options_size);
+               strlcat(options,prefixpath,options_size); /* no need to cat the / */
+       }
        if(verboseflag)
                printf("\nmount.cifs kernel mount options %s \n",options);
 -      if(mount(share_name, mountpoint, "cifs", flags, options)) {
 -      /* remember to kill daemon on error */
 -              char * tmp;
  
 +      /* convert all '\\' to '/' so that /proc/mounts looks pretty */
 +      replace_char(dev_name, '\\', '/');
 +
 +      if(mount(dev_name, mountpoint, "cifs", flags, options)) {
 +      /* remember to kill daemon on error */
                switch (errno) {
                case 0:
                        printf("mount failed but no error number set\n");
@@@ -1353,7 -1395,8 +1435,6 @@@ mount_exit
                free(resolved_path);
        }
  
 -      if(free_share_name) {
 -              free(share_name);
 -              }
 +      free(share_name);
        return rc;
  }