1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-18 19:17:08 +03:00

72 Commits

Author SHA1 Message Date
Jeremy Allison
818fbc9889 Tidyup to ensure '\n' is treated identically in all
cases.
Jeremy.
2008-05-01 08:48:52 -07:00
Jeremy Allison
41984743d9 Fix bug #5434 found by Ted Percival <ted@midg3t.net>.
Introduced by me in the strlcpy cleanup. Ensure the
loaded password doesn't contain the '\n' at the end.
Jeremy.
2008-05-01 08:39:16 -07:00
Jeremy Allison
7a724d78e1 Sync up client/mount.cifs.c with v3-2-test.
Jeremy.
2008-04-25 09:29:11 -07:00
Karolin Seeger
d99a31848b mount.cifs: Zero mountpassword content before freeing.
Karolin
2008-04-25 12:40:54 +02:00
Jeremy Allison
cc23f91d63 Make mount.cifs.c consistent with other Samba code usage w.r.t
SAFE_FREE. Use #define constants not arbitrary numbers. Stevef
please check. Karolyn, once Steve has checked please pull for
3.2-stable.
Jeremy.
2008-04-24 10:24:05 -07:00
Jeff Layton
e03d1dfdb8 mount.cifs: fix several problems when mounting subdirectories of shares (try 2)
This patch is the second patch to attempt to fix up some of the problems
with mounting subdirectories of shares. The earlier patch didn't handle
this correctly when POSIX extensions were enabled. This one does.

This is a bit of a confusing area since the different components of
a service string have different rules:

1) hostname: no '/' (slash) or '\' (backslash) is allowed to be
	     embedded within the string

2) sharename: same rules as hostname

3) prefixpath: '\' *is* allowed to be embedded in a path component,
	       iff POSIX extensions are enabled. Otherwise, neither
	       character is allowed.

The idea here is to allow either character to act as a delimiter when we
know that the character can't be anything but a delimiter (namely
everywhere up to the start of the prefixpath). The patch will convert
any '\' unconditionally to '/' in the UNC portion of the string.

However, inside the prefixpath, we can't make assumptions about what
constitutes a delimiter because POSIX allows for embedded '\'
characters. So there we don't attempt to do any conversion, and pass the
prefixpath to the kernel as is. Once the kernel determines whether POSIX
extensions are enabled, it can then convert the path if needed and it's
able to do so. A patch to handle this has already been committed to the
cifs-2.6 git tree.

This patch also fixes an annoyance. When you mount a subdir of a share,
mount.cifs munges the device string so that you can't tell what the
prefixpath is. So if I mount:

	//server/share/p1/p2/p3

..then /proc/mounts and mtab will show only:

	//server/share

Finally, it also tries to apply some consistent rules to the uppercasing
of strings.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2008-03-31 16:05:20 -04:00
Volker Lendecke
d32066eaef Do the formatting change in all 3 places :-) 2008-02-25 09:55:53 +01:00
Volker Lendecke
19de47fef1 Fix confusing error message -- bug 5252
Thanks to Walter Franzini
2008-02-25 09:51:33 +01:00
Simo Sorce
ce57d38825 Make sure mount.cifs.c compiles on Fedora 9 with gcc 4.3 2008-02-22 14:10:28 -05:00
Simo Sorce
c5b7d538ec Revert "Merge in J.Layton patch and resolve conflict."
This reverts commit 6b1a118eaaab405eeef0cf3c0488a2747af562ba.

We found that this patch does not play well with currently released cifs.ko
code, so after discussions with Jeff Layton and Steve french we decided it
is best to back it off and re-think a better approach. Jeff will send new
patches later, but for now it is better to just revert to the previous code
2008-02-14 12:03:32 -05:00
Steve French
b9d2da4d10 Update mount.cifs help
Steve
2008-01-03 17:13:38 -06:00
Simo Sorce
6b1a118eaa Merge in J.Layton patch and resolve conflict. 2007-12-17 09:43:18 -05:00
Jeremy Allison
27078d1292 We don't need to call endpwent if we never call getpwent.
Jeremy.
2007-12-13 17:25:26 -08:00
Jeremy Allison
7fad5f38ea Add a varient of Steve Langasek <vorlon@debian.org> patch
for bug #4780. Cause user mounts to inherit uid= and gid= from the
calling user when called as non-root, except when overridden on the
commandline.
Jeremy.
2007-12-13 17:18:48 -08:00
Jeremy Allison
b215fb1ad0 Missed one strcpy call.
Jeremy.
2007-12-12 19:12:18 -08:00
Jeremy Allison
eff2b368e8 Add a portable version of strlcpy and strlcat and convert
all strncpy/strcat calls to them.
Convert all sprintf calls to snprintf. Safety first !
Jeremy.
2007-12-12 19:06:04 -08:00
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00
Gerald (Jerry) Carter
5c6c8e1fe9 [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. 2007-10-10 15:34:30 -05:00
Steve French
0202a84e3f r25355: IP address parsing did not allow for fully expanded ipv6 addresses
(which can be 12 bytes longer than we were allowing for).

Thanks to Dr. David Holder
2007-10-10 12:31:00 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Steve French
500d9236c4 r22982: Do not prompt for password on sec=none for mount.cifs (and allow guest
option to pass to kernel code so it can know when to retry)
2007-10-10 12:22:13 -05:00
Steve French
c8aa60692b r22979: Revert previous checkin (which had some debug junk) and fix misc frees that
valgrind noticed
2007-10-10 12:22:13 -05:00
Steve French
9af97d8ead r22779: Patch for not prompting for password on cifs mounts when "sec=none"
specified
2007-10-10 12:21:56 -05:00
Steve French
4616c29b9f r22560: Clean up frees of realloc memory in mount.cifs (thanks to Alex for
reminding me how to use Valgrind).
2007-10-10 12:19:45 -05:00
Steve French
0548dea6c7 r22526: Support deep tree mounts after share (instead of having to specify
prepath)
2007-10-10 12:19:42 -05:00
Steve French
bd9439cc7d r21840: mount.cifs compile on old libc missing bind mount #define
Thanks to Thomas Jarosch for pointing this out.
2007-10-10 12:18:37 -05:00
Volker Lendecke
05268d7a73 r17605: Some C++ warnings 2007-10-10 11:38:42 -05:00
Jeremy Allison
9dafb7f48c r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
2007-10-10 11:19:14 -05:00
Volker Lendecke
3df0bf7d60 r16360: Fix Klocwork ID 136 520 521 522 523 542 574 575 576 607
in net_rpc.c: 715 716 732 734 735 736 737 738 739 749

in net_rpc_audit.c: 754 755 756

in net_rpc_join.c: 757

in net_rpc_registry: 766 767

in net_rpc_samsync.c: 771 773

in net_sam.c: 797 798

Volker
2007-10-10 11:18:48 -05:00
Steve French
2ec51635ae r14127: Remove coverity warning on mount.cifs.c 2007-10-10 11:11:13 -05:00
Steve French
32c7243b80 r14126: resolve two warnings from the coverity scan 2007-10-10 11:11:13 -05:00
Jeremy Allison
af0ade470f r14009: Remove last const warning (have to use CONST_DISCARD).
Jeremy.
2007-10-10 11:11:05 -05:00
Jeremy Allison
ead13ca522 r14006: Fix a couple of irritating warnings.
Jeremy.
2007-10-10 11:11:04 -05:00
Lars Müller
3c277c7a3c r13714: Set MOUNT_CIFS_VENDOR_SUFFIX if _SAMBA_BUILD_ is set to
"-"SAMBA_VERSION_OFFICIAL_STRING"-"SAMBA_VERSION_VENDOR_SUFFIX if
SAMBA_VERSION_VENDOR_SUFFIX is set or "-"SAMBA_VERSION_OFFICIAL_STRING
only if MOUNT_CIFS_VENDOR_SUFFIX is undefined.

This results in: mount.cifs -V
mount.cifs version: 1.10-3.1.2pre1-SVN-build-13706-foovendor
or
mount.cifs version: 1.10-3.1.2pre1-SVN-build-13706

Steve: If this is to long or you do not like it, we might add something
lile -VV to report the added part.
2007-10-10 11:10:50 -05:00
Steve French
0981552dea r11938: Fix cifs to handle non-numeric uid and gid parameters and merge trunk and SAMBA_3 versions of mount.cifs and cleanup cifs vfs help.
Modified version of patch from Olaf Kirch <okir at SuSE dot de> for
Novell Bug 120601
2007-10-10 11:05:37 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Steve French
e5cb7d2131 r9401: Allow disabling mandatory byte range lock mount flag, and
fix corresponding entry in mtab.
2007-10-10 11:00:34 -05:00
Steve French
98a7304b6b r9225: Various minor CIFS mount helper fixes to less common error paths.
These bugs were found by Coverity static source code analysis tools.
2007-10-10 11:00:28 -05:00
Steve French
ed27740397 r6514: Allow domain= to be specified in credentials file. Fix umount.cifs help, allow root to unmount someone
else's mount
2007-10-10 10:56:44 -05:00
Steve French
37685979bb r6505: Add missing remount flag handling 2007-10-10 10:56:44 -05:00
Steve French
2ed6b5ecab r6499: Add two newer mount options to syntax help for mount.cifs 2007-10-10 10:56:43 -05:00
Steve French
6efd6225fa r6103: Update list of mount options for mount.cifs 2007-10-10 10:56:21 -05:00
Steve French
72eda746c2 r5897: Fix domain name parsing for cifs mount util 2007-10-10 10:56:07 -05:00
Steve French
d98417b2cf r5896: Fix cifs mounts to handle commas embedded in prompted password, and password and credential files.
Fix cifs mounts to handle domain name and user name in username field (in form domain\user)
2007-10-10 10:56:07 -05:00
Steve French
58afef91c5 r5688: ignore user_xattr mount parm so as not to confuse it with a user name 2007-10-10 10:55:55 -05:00
Steve French
8bd98b643d r5640: On failed mount (ENXIO) retry share name in uppercase (fix mount to FastConnect AIX SMB server) 2007-10-10 10:55:53 -05:00
Steve French
076485169e r5236: Ignore users mount parm (since unneeded by cifs kernel code). Suggested by Dirk Jagdmann. 2007-10-10 10:55:34 -05:00
Steve French
a23c607ef0 r3068: strip guest mount option off before sending to kernel mount routine to avoid logging spurious message 2007-10-10 10:53:00 -05:00
Steve French
1052eabf29 r2917: Fix ip address override in mount.cifs mount helper and clean up warning messages from the sparse tool and expand syntax help 2007-10-10 10:52:56 -05:00