Hi folks,

this is an updated version of Urban Widmark's smbmount patch to enable
lfs and unicode options to be switched on the command line. It's
diff'd against current CVS HEAD.

Cheers,
Waider.

Index: source/client/smbmount.c
===================================================================
RCS file: /cvsroot/samba/source/client/smbmount.c,v
retrieving revision 1.65
diff -a -u -r1.65 smbmount.c
--- source/client/smbmount.c    15 Feb 2003 00:29:20 -0000      1.65
+++ source/client/smbmount.c    25 Feb 2003 14:01:43 -0000
@@ -51,6 +51,8 @@
 static BOOL use_kerberos;
 /* TODO: Add code to detect smbfs version in kernel */
 static BOOL status32_smbfs = False;
+static BOOL smbfs_has_unicode = False;
+static BOOL smbfs_has_lfs = False;
 
 static void usage(void);
 
@@ -212,6 +214,12 @@
            c->force_dos_errors = True;
        }
 
+       if (!smbfs_has_lfs)
+         c->capabilities &= ~CAP_LARGE_FILES;
+
+       if (!smbfs_has_unicode)
+         c->capabilities &= ~CAP_UNICODE;
+
        if (!cli_session_setup(c, username, 
                               password, strlen(password),
                               password, strlen(password),
@@ -828,6 +836,10 @@
                                mount_ro = 0;
                        } else if(!strcmp(opts, "ro")) {
                                mount_ro = 1;
+                       } else if(!strcmp(opts, "unicode")) {
+                               smbfs_has_unicode = True;
+                       } else if(!strcmp(opts, "lfs")) {
+                               smbfs_has_lfs = True;
                        } else {
                                strncpy(p, opts, sizeof(pstring) - (p - options) - 1);
                                p += strlen(opts);

-- 
[EMAIL PROTECTED] / Yes, it /is/ very personal of me.
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)   # RSA in Perl

Reply via email to