Age | Commit message (Collapse) | Author | Files | Lines |
|
The current name resolution scheme in mount.cifs is IPv4 only. Expand
it to be protocol-independent. Also take advantage of the fact that
getaddrinfo() returns a list of addresses and have mount.cifs try each
in turn until it hits one that's reachable and allows the socket to
connect.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
smbfs also would use the USER environment variable if the user was not
specified on the mount command and no credential file specified, and
mount.cifs man page says that we will use this environment variable
(in most cases this will not cause a behavior change, because
we were doing getuid of the current process which will usually be
the same name).
Fixes Samba bug #5934
Acked-by: Jeff Layton
|
|
The util-linux-ng sources have a good, but rather complex scheme for
locking the mtab before updating it. Mount helpers need to follow the
same scheme. Advisory locking only works if everyone is using the same
locking scheme.
Copy the routines we need from util-linux-ng into a separate source file
and then have mount.cifs and umount.cifs link in this object.
The long term goal is to have these routines in a separate helper
library (libmount). Mount helpers can then dynamically link in that lib.
Until that happens, this should serve as a suitable stopgap solution.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Jeremy.
|
|
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@redhat.com>
|
|
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@redhat.com>
|
|
Jeff, Steve, please check!
|
|
...to silence -Wmissing-prototypes
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(This used to be commit fc7c71f15b39158ac58beaa90cc9038db680b8cb)
|
|
Thanks to Christophe Curis for the suggestion
(This used to be commit 3b5ad9190d2ad6d2ca0a569194bdff9003bda13b)
|
|
krb5 mounts require that the user already have a valid krb5 ticket.
Since we can't currently use the password entered, don't prompt for it.
Also, switch to using strncmp instead of strcmp here.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(This used to be commit c75791c34abebe23c6f6a5534b0358514ec4eabc)
|
|
(so parsing for domain parameter in mount.cifs matches online help)
and rephrasing original code to make it more clear.
The check for "domain" was meant to allow for "dom" or "DOM" and the
option ("dom") described in the help (e.g. "/sbin/mount.cifs -?") is the
shorter ("dom") form. The reason that the string we compare against
is larger was to improve readability (we could compare against "dom"
but note /* "domain" or "DOMAIN" or "dom" or "DOM" */ but it seemed
terser to just show the larger string in the strcmp target. The
change to "workgoup" from workg* (anything which begins with "workg"
doesn't matter - it is a minor behavior change - but probably few
scripts depend on the "alias" for this option).
Rework code so that it is clearer what we are comparing against.
(This used to be commit 92fad0fc537e75c726d5d6794dd0c4fd61edca2d)
|
|
strlcat gives error.
Jeremy.
(This used to be commit d7c82997bdcf1acd7ac104efa0ad05e0b94935ea)
|
|
Steve, please check!
Thanks,
Volker
(This used to be commit 5222b8db3fb692e5071bfd1b41849a8eb0a17995)
|
|
cases.
Jeremy.
(This used to be commit 818fbc9889af8c9fb6e7978e8ed2269a78f14404)
|
|
Introduced by me in the strlcpy cleanup. Ensure the
loaded password doesn't contain the '\n' at the end.
Jeremy.
(This used to be commit 41984743d9e89b6568119832c35ee4c0024e43a2)
|
|
Jeremy.
(This used to be commit 7a724d78e11f016f154c0029dc394ce133f41110)
|
|
Karolin
(This used to be commit d99a31848bd2172c15500dd61ce30fef963c1ac6)
|
|
SAFE_FREE. Use #define constants not arbitrary numbers. Stevef
please check. Karolyn, once Steve has checked please pull for
3.2-stable.
Jeremy.
(This used to be commit cc23f91d639db61903bf8b6c9fa46ec9c1f44178)
|
|
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>
(This used to be commit e03d1dfdb80333c071b600245eb749ef5664aa22)
|
|
(This used to be commit d32066eaef1d09ec41fd5365e18eacd93e485d53)
|
|
Thanks to Walter Franzini
(This used to be commit 19de47fef1b35c47885acc40760a232e4643079c)
|
|
(This used to be commit ce57d388251063c22f89680e9d1c2129d9879975)
|
|
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
(This used to be commit c5b7d538ecfa93377ff20704633ac57dbf8dd530)
|
|
Steve
(This used to be commit b9d2da4d10e6e7ac2dc604565c7f2ce39d0916b5)
|
|
(This used to be commit 6b1a118eaaab405eeef0cf3c0488a2747af562ba)
|
|
Jeremy.
(This used to be commit 27078d1292e8588956ae78e4cddb1bcebbe84478)
|
|
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.
(This used to be commit 7fad5f38ea86ef76dc8e0853926b3248230616be)
|
|
Jeremy.
(This used to be commit b215fb1ad0d5bb3fa7084c2773845ce1dffb2173)
|
|
all strncpy/strcat calls to them.
Convert all sprintf calls to snprintf. Safety first !
Jeremy.
(This used to be commit eff2b368e891d523de38b43ced95798b74ae101e)
|
|
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
|
|
(This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
|
|
(which can be 12 bytes longer than we were allowing for).
Thanks to Dr. David Holder
(This used to be commit 0202a84e3f61665953bd5207218063b0d5ff6088)
|
|
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
|
|
Jeremy.
(This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
|
|
option to pass to kernel code so it can know when to retry)
(This used to be commit 500d9236c419be6ec32cc209279aeea2234f1a21)
|
|
frees that
valgrind noticed
(This used to be commit c8aa60692ba23c43820b820db3371a86dfbf40b5)
|
|
specified
(This used to be commit 9af97d8ead85c05d08ee24727525894df5866630)
|
|
reminding me how to use Valgrind).
(This used to be commit 4616c29b9f09b9863f1446e83c98e3adc327d0f9)
|
|
prepath)
(This used to be commit 0548dea6c7222dc22144a86fffd32675cd14b677)
|
|
Thanks to Thomas Jarosch for pointing this out.
(This used to be commit bd9439cc7d80e172feab72229b553028e134de05)
|
|
(This used to be commit 05268d7a731861b10ce8556fd32a004808383923)
|
|
to do the upper layer directories but this is what
everyone is waiting for....
Jeremy.
(This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
|
|
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
(This used to be commit 3df0bf7d6050fd7c9ace72487d4f74d92e30a584)
|
|
(This used to be commit 2ec51635ae7ba448f18c4c1342a5fd2adb1ec869)
|
|
(This used to be commit 32c7243b80f1f06d37511fb87f7a5c715f4847c6)
|
|
Jeremy.
(This used to be commit af0ade470f2fac3509a44207b4572e279ba30e34)
|
|
Jeremy.
(This used to be commit ead13ca522d7b8cbb47d660d3cb73c3582088985)
|
|
"-"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.
(This used to be commit 3c277c7a3cce14f185db7fede7c0c4ab77769670)
|
|
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
(This used to be commit 0981552deab9f73d2f784e5da52878ffdf845031)
|
|
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
|