1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

1058 Commits

Author SHA1 Message Date
Volker Lendecke
867626abca s3: Convert cli_list() to return NTSTATUS
If needed, the callback functions can count themselves
2010-08-04 20:32:50 +02:00
Volker Lendecke
fcdda8f443 s3: Remove "cli" from "struct finfo" 2010-07-30 17:01:33 +02:00
Volker Lendecke
dace013898 s3: Remove a typedef (struct file_info) 2010-07-27 21:05:35 +02:00
Volker Lendecke
2ad4b4f63e s3: Convert cli_qpathinfo_streams to cli_qpathinfo_send 2010-07-26 23:01:38 +02:00
Volker Lendecke
f62bde93ce s3: Convert cli_qpathinfo2 to cli_qpathinfo_send 2010-07-26 23:01:37 +02:00
Volker Lendecke
9a2d08bd3c s3: Use error status instead of cli_errstr 2010-07-26 23:01:37 +02:00
Jeremy Allison
8ce15b3a71 Fix bug - 7551 smbclient does not return proper exit code.
Catch error in cli_push.

Jeremy.
2010-07-15 16:06:11 -07:00
Andreas Schneider
ee01fe8c5b s3-client: Make sure we only write to an opened file.
Found by clang-analyzer.
2010-06-29 11:12:12 +02:00
Günther Deschner
7f6bb48bdf s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".
Guenther
2010-05-18 12:30:12 +02:00
Jeremy Allison
f3b8e31f83 Split out the client unix capabilities to those the server offered, and those the client asked for.
This fixes a bug when using encrypted transport and DFS links. Found
by my basic DFS torture test, which I'll check in next. Testing *rocks* :-).

Jeremy.
2010-04-13 18:41:14 -07:00
Jeremy Allison
f1fe808978 Add an "attributes" string to allinfo.
Jeremy.
2010-02-22 14:36:40 -08:00
Volker Lendecke
2beaa19029 s3: Slightly simplify the logic of completion_remote_filter 2010-02-20 18:59:30 +01:00
Volker Lendecke
1f451d122e s3: Remove a "typedef struct" 2010-02-20 18:59:30 +01:00
Volker Lendecke
f27857e655 s3: Fix a typo 2010-02-20 18:59:30 +01:00
Volker Lendecke
8930a9c520 s3: Convert cli_qpathinfo_basic to use cli_trans() 2010-02-20 18:59:30 +01:00
Volker Lendecke
6e510b49c0 s3: Make cli_get_fs_volume_info() use cli_trans() 2010-02-07 12:29:25 +01:00
Volker Lendecke
24d4433bd7 s3: Move "yesno" to the only place where it is used: client.c 2010-01-21 12:58:11 +01:00
Volker Lendecke
33601b8632 s3: Pass fake_dir_create_times down to file_exist_stat, none of the callers look at the mtime 2009-11-29 11:22:04 +01:00
Volker Lendecke
5ba42b0a5b s3: "tar_parseargs" only looks at the mtime 2009-11-29 11:22:02 +01:00
Volker Lendecke
e1f53e5d49 s3: "dotareof" only looks at the file type 2009-11-29 11:22:02 +01:00
Volker Lendecke
932ab0c299 s3: client "newer" does not look at the create timestamp 2009-11-29 11:22:02 +01:00
Volker Lendecke
44ce5603dd s3: Pass the "fake dir create times" parameter to sys_*stat
Step 0 to restore it as a per-share paramter
2009-11-29 11:22:01 +01:00
Günther Deschner
3d679a3b5f s3-rpc: Avoid including every pipe's client and server stubs everywhere in samba.
Guenther
2009-11-26 20:03:17 +01:00
Volker Lendecke
a1a81ef785 Revert "s3: Make the implicit reference to Protocol in mask_match() explicit"
This reverts commit e23d8a3d1f.
2009-11-23 16:35:00 +01:00
Volker Lendecke
d6e55d8ec0 Revert "s3: Make the implicit reference to Protocol in mask_match_list() explicit"
This reverts commit 1e22899d26.
2009-11-23 16:35:00 +01:00
Volker Lendecke
0f8e2a6ebb Revert "s3: Move the global variable Protocol to struct smbd_server_connection"
This reverts commit c85a4c9ba4.
2009-11-23 16:34:59 +01:00
Volker Lendecke
c85a4c9ba4 s3: Move the global variable Protocol to struct smbd_server_connection 2009-11-21 20:49:17 +01:00
Volker Lendecke
1e22899d26 s3: Make the implicit reference to Protocol in mask_match_list() explicit 2009-11-21 20:49:17 +01:00
Volker Lendecke
e23d8a3d1f s3: Make the implicit reference to Protocol in mask_match() explicit 2009-11-21 20:49:16 +01:00
Volker Lendecke
f668e4104f s3: Convert cli_set_unix_extensions_capabilities_send to async 2009-11-14 11:03:28 +01:00
Volker Lendecke
f9ad5cd133 s3: Convert cli_unix_extensions_version to async 2009-11-13 09:30:30 +01:00
Jeremy Allison
5363d6e62c Ensure all callers to the rpc_client/cli_pipe functions correctly
initialize return variables.
Jeremy.
2009-11-12 13:56:33 -08:00
Volker Lendecke
2b75933960 s3: Convert libsmb/cli_message to the async API 2009-11-10 23:48:22 +01:00
Jeremy Allison
e67de63ba6 Make cli_posix_lock/unlock asynchronous.
Jeremy.
2009-07-13 18:43:10 -07:00
Jeremy Allison
661f0ba73b Fix coverity #729. Resource leak in error path.
Jeremy.
2009-06-19 17:26:53 -07:00
Jeremy Allison
ba4d51c521 Fix bug #2356 - smbclient -t <term code> no longer works.
Removed code and docs.
Jeremy.
2009-06-03 09:44:49 -07:00
Jelmer Vernooij
8d033ec0d1 Move mount.cifs/umount.cifs to the top level and remove the outdated copy
in Samba 4.
2009-06-02 23:24:33 +02:00
Jeremy Allison
9df85a9374 Make cli_posix_chown()/cli_posix_chmod() async.
Jeremy.
2009-05-28 16:15:09 -07:00
Jeremy Allison
656e86d5fa Make cli_posix_stat() async.
Jeremy.
2009-05-28 13:32:00 -07:00
Jeremy Allison
d74e42e0ec Make getfacl async.
Jeremy.
2009-05-28 13:05:50 -07:00
Jeremy Allison
bd11948107 Add a smbclient "readlink" command and add docs for it.
Jeremy.
2009-05-27 22:02:20 -07:00
Jeremy Allison
f55c7614bd Add aync POSIX hardlink and symlink and torture test for them.
Missing call cli_readlink() is next.
Jeremy.
2009-05-27 17:28:23 -07:00
Volker Lendecke
49ca690b4b Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STAT
This patch introduces

struct stat_ex {
        dev_t           st_ex_dev;
        ino_t           st_ex_ino;
        mode_t          st_ex_mode;
        nlink_t         st_ex_nlink;
        uid_t           st_ex_uid;
        gid_t           st_ex_gid;
        dev_t           st_ex_rdev;
        off_t           st_ex_size;
        struct timespec st_ex_atime;
        struct timespec st_ex_mtime;
        struct timespec st_ex_ctime;
        struct timespec st_ex_btime; /* birthtime */
        blksize_t       st_ex_blksize;
        blkcnt_t        st_ex_blocks;
};
typedef struct stat_ex SMB_STRUCT_STAT;

It is really large because due to the friendly libc headers playing macro
tricks with fields like st_ino, so I renamed them to st_ex_xxx.

Why this change? To support birthtime, we already have quite a few #ifdef's at
places where it does not really belong. With a stat struct that we control, we
can consolidate the nanosecond timestamps and the birthtime deep in the VFS
stat calls.

At this moment it is triggered by a request to support the birthtime field for
GPFS. GPFS does not extend the system level struct stat, but instead has a
separate call that gets us the additional information beyond posix. Without
being able to do that within the VFS stat calls, that support would have to be
scattered around the main smbd code.

It will very likely break all the onefs modules, but I think the changes will
be reasonably easy to do.
2009-05-26 17:48:23 +02:00
Jeremy Allison
000da55dd9 Make cli_posix_open() and cli_posix_mkdir() async.
Jeremy.
2009-05-20 18:31:36 -07:00
Jeremy Allison
0a8bb37fa2 Oops. Forgot to delete now unused local from the previous patch.
Jeremy.
2009-05-15 16:16:47 -07:00
Ole Hansen
ad7dca471a Fix bug #6359 - smbclient -L does not list workgroup for hosts with both IPv4 and IPv6 addresses 2009-05-15 16:13:59 -07:00
Jeff Layton
b0c399ce60 mount.cifs: directly include sys/stat.h in mtab.c
This file is mysteriously getting included when built via the makefile,
but when you try to build mtab.o by hand it fails to build. Directly
include it to remove any ambiguity.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2009-05-15 14:31:28 -04:00
Steve French
d35a3952f0 Maximum password length check too short in mount.cifs
Windows allows up to 127 byte passwords, and we using a 64 byte limit
    in most places and a 16 byte limit when using the "pass=" mount option

    Acked-by: Jeff Layton <jlayton@redhat.com>
    Signed-off-by: Steve French <sfrench@us.ibm.com>
2009-05-14 15:04:27 -05:00
Jeremy Allison
606edf0f35 Make cli_setatr async.
Jeremy.
2009-05-06 16:13:42 -07:00
Jeremy Allison
4cbd0c77e4 Make cli_getatr() async.
Jeremy.
2009-05-05 20:59:22 -07:00
Jeremy Allison
e091fdc565 Make cli_getattrE async.
Jeremy.
2009-05-05 16:28:44 -07:00
Volker Lendecke
4949a2cfaa Fix some warnings due to uint16_t!=-1 always being true 2009-05-03 22:48:31 +02:00
Jeremy Allison
f3af298e5b Cause cli_close to return an NTSTATUS.
Jeremy.
2009-04-30 16:57:42 -07:00
Jeremy Allison
8cf78ff553 Get medieval on our ass about SMB1 file descriptors being 16 bits, not an int.
Convert all uses of cli_open(), cli_nt_createXXX to NTSTATUS versions.
This is smaller than it looks, it just fixes a lot of old code.
Next up, ensure all cli_XX functions return NTSTATUS.
Jeremy.
2009-04-30 15:26:43 -07:00
Jeremy Allison
370e7209db Make cli_unlink async.
Jeremy.
2009-04-29 18:26:02 -07:00
Jeremy Allison
edd25980b0 More async calls in libsmb/clifile.c
Jeremy.
2009-04-29 10:48:16 -07:00
Jeremy Allison
bd6447dcf2 Convert cli_rename to async.
Jeremy.
2009-04-28 16:43:16 -07:00
Jeremy Allison
06e404f574 Convert cli_posix_unlink() and cli_posix_rmdir()
to async. First trans calls I've done.
Jeremy.
2009-04-28 13:18:51 -07:00
Jeremy Allison
455f2a4c65 Make dskattr async.
Jeremy.
2009-04-22 08:04:53 -07:00
Jeremy Allison
502f47c7c0 Make cli_chkpath async.
Jeremy
2009-04-22 06:46:42 -07:00
Jeremy Allison
5ccf58ff59 Make rmdir async.
Jeremy.
2009-04-21 06:52:54 -07:00
Jeremy Allison
dfc79de607 Make cli_mkdir async. Change it to return NTSTATUS.
Jeremy.
2009-04-21 05:52:34 -07:00
Jelmer Vernooij
4c32978d97 Remove smb_mkstemp() - libreplace will now provide a secure mkstemp() if
the system one is broken.
2009-04-20 23:58:26 +02:00
Jeremy Allison
8dd1faaa29 Remove the global "struct cm_cred_struct" and associated calls, make
callers pass in a struct user_auth_info * instead. This commit causes
smbc_set_credentials() to print out a message telling callers to use
smbc_set_credentials_with_fallback() instead, as smbc_set_credentials()
has a broken API (no SMBCCTX * pointer). No more global variables used
in the connection manager API for client dfs calls.
Jeremy.
2009-03-17 14:53:06 -07:00
Volker Lendecke
8174a90e43 Fix #3954 2009-03-14 12:40:58 +01:00
Jeremy Allison
e5136e9849 Remove the static "struct client_connection" mess which is part of
the problem that stops libsmbclient being thread safe. Subsidiary
DFS connections are now hung off a list inside the cli_state struct.
Much more to do in order to get libsmbclient to thread safety, but
this is a good start.
Jeremy.
2009-03-12 17:59:24 -07:00
Stefan Metzmacher
2fdbafbf54 Revert "s3:libsmb: add an option to cli_push to let the caller provide the buffers"
This reverts commit 9579a6f193.

It's confusing to have a boolean to alter the behavior of cli_push
and as the new feature isn't used yet I revert it.

We can readd a extra function later.

metze
2009-03-12 11:03:50 +01:00
Stefan Metzmacher
9579a6f193 s3:libsmb: add an option to cli_push to let the caller provide the buffers
metze
2009-03-10 14:07:56 +01:00
Jeremy Allison
66c0f3690a Fix bug #6161 - smbclient corrupts source path in tar mode
This was my fault. I broke the smbclient tar argument processing
in creating the string for chdir when removing pstrings.
Jeremy.
2009-03-05 17:19:18 -08:00
Steve French
d75df71733 Fix guest mounts
guest session setup, login (user id) as anonymous.
    This patch is for samba bugzilla bug 4640.

    Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com>
    Acked-by: Jeff Layton <jlayton@redhat.com>
    Signed-off-by: Steve French <sfrench@samba.org>
2009-02-24 20:53:46 -06:00
Michael Adam
d7ca499701 s3:mount.cifs: make "mount.cifs -V" print the version, not usage.
Also make "mount.cifs -h" not exit with error exit code but with return code 0.

Michael
2009-02-24 16:59:55 +01:00
Michael Adam
6e16c5eed5 s3:mount.cifs: don't error exit on explicitly requested help...
Michael
2009-02-24 16:59:54 +01:00
Jeremy Allison
faa1100d22 More warning fixes for Solaris.
Jeremy.
2009-02-23 16:22:43 -08:00
Volker Lendecke
0844cca1d5 Replace get_myname() with the talloc version from v3-3-test 2009-02-13 12:15:03 +01:00
Volker Lendecke
1b6543c5f9 Fix Coverity IDs 879 and 880 (RESOURCE_LEAK, REVERSE_INULL) 2009-02-12 23:02:53 +01:00
Jeff Layton
d895ca505f mount.cifs: initialize rc to 0 in main
The value of rc in main() isn't initialized in the declaration. This
wasn't a problem before, but Shirish's fakemount patch can make it so
that we return the uninitialized variable if the -n flag is used.

Fix this by initializing rc to 0.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2009-02-06 08:29:58 -05:00
Shirish Pargaonkar
ea8bd81b6e mount.cifs: add fakemount (-f) and nomtab (-n) flags to mount.cifs
...so that these options work correctly when passed in by mount(8).
2009-02-06 08:13:38 -05:00
Shirish Pargaonkar
16d2fdf575 umount.cifs: clean-up entries in /etc/mtab after unmount
This patch removes the remaining entry in /etc/mtab after a filesystem
is unmounted by canonicalizing the mountpoint supplied on the command
line.

Please refer to bug 4370 in samba bugzilla.
2009-02-05 14:12:42 -05:00
Volker Lendecke
0bd92281e4 Make cli_tcon_andx async 2009-01-30 12:47:59 +01:00
Michael Adam
39ec8791f8 s3: make better use of ccache by not including version.h in every C-file.
version.h changes rather frequently. Since it is included via includes.h,
this means each C file will be a cache miss. This applies to the following
situations:

* When building a new package with a new Samba version

* building in a git branch after calling mkversion.sh
  after a new commit (i.e. virtually always)

This patch improves the situation in the following way:

* remove inlude "version.h" from includes.h

* Use samba_version_string() instead of SAMBA_VERSION_STRING
  in files that use no other macro from version.h instead of
  SAMBA_VERSION_STRING.

* explicitly include "version.h" in those files that use more
  macros from "version.h" than just SAMBA_VERSION_STRING.

Michael
2009-01-15 22:56:01 +01:00
Jeremy Allison
907f085296 Remove smbclient globals that bled into clidfs.c. Now we only have
the connections list and authentication structures to worry about.
Jeremy
2009-01-14 16:08:19 -08:00
Jeremy Allison
2c0a802cf8 Remove another global from clidfs that is only used in client.c.
Jeremy.
2009-01-14 14:26:56 -08:00
Jeremy Allison
590c9b7b6d Fix bug #6021 - smbclient du command does not recuse properly
Jeremy.
2009-01-08 15:41:49 -08:00
Volker Lendecke
01891782fd Fix bug 6014 -- mget shouldn't segfault without arguments
Thanks to kevin.paulus@mtm.kuleuven.be for the bug report

Volker
2009-01-05 15:53:26 +01:00
Jeremy Allison
3d2d0203e5 Remove cli_cm_set_dest_ss() - removes the global dest_ss
from libsmb/clidfs.c. Keep the '-I<address>' option in
smbclient working. The intent is to remove all globals
from libsmb/clidfs.c.
Jeremy.
2009-01-02 12:49:49 -08:00
Jeremy Allison
07e0094365 Fix all warnings in source3 with gcc4.3.
Jeremy.
2008-12-31 18:06:57 -08:00
Jeremy Allison
bb23f5725f Fix more asprintf and "ignoring return code" warnings from gcc 4.3.
Jeremy.
2008-12-31 16:30:11 -08:00
Volker Lendecke
32a7ecf5ce Make smbclient "put" use cli_push
This should fill the TCP socket even beyond the smbclient io_bufsize, very much
like smbclient "get" should do it since 3.2
2008-12-19 23:33:55 +01:00
Volker Lendecke
daeb3a190d Remove the global "cmdline_auth_info" from source3/lib/util.c
This involves changing all our clients, that's why it's so large.
2008-12-14 14:00:43 +01:00
Jeff Layton
9069c84907 mount.cifs: allow mounts to ipv6 capable servers
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>
2008-12-12 07:00:38 -05:00
Steve French
420a9071e1 mount.cifs: if mount user not specified use USER environment variable
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
2008-12-05 08:09:08 -06:00
Tim Prouty
1eb743ab8e s3: Change sockaddr util function names for consistency
Also eliminates name conflicts with OneFS system libraries
2008-12-03 10:40:20 -08:00
Jeff Layton
32695912dd mount.cifs: use lock/unlock_mtab scheme from util-linux-ng mount prog
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>
2008-11-06 15:07:07 -05:00
Jeremy Allison
0a6ff29e29 Fix CID: 456 - resource leak on function exit.
Jeremy.
2008-10-29 17:07:14 -07:00
Volker Lendecke
097f40249c Make use of a large buffer for smbclient put command 2008-10-23 17:46:00 +02:00
Jelmer Vernooij
2d89b52be8 Use separate make variables for libutil and libcrypto. 2008-10-18 14:28:40 +02:00
Jelmer Vernooij
4746f79d50 Use {u,}int64_t instead of SMB_BIG_{U,}INT. 2008-10-14 01:59:36 +02:00
Jeff Layton
2c9df6401c 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@redhat.com>
2008-10-09 09:58:40 -04:00
Jeff Layton
dd9002cf49 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@redhat.com>
2008-10-09 09:58:39 -04:00
Jeremy Allison
af9dc6381d Fix the build farm. In this branch cli_echo returns NTSTATUS.
Jeremy
2008-10-03 17:57:37 -07:00
Jeremy Allison
a9390d3047 Correctly fix smbclient to terminate on eof from server.
Jeremy.
2008-10-03 14:58:41 -07:00
Volker Lendecke
73aebd7d07 Attempt to fix bug 5778
Jeff, Steve, please check!
2008-09-21 22:56:50 +02:00
Timur
a664cf7658 Fix display of POSIX ACLs. 2008-09-15 18:25:15 -07:00
Jeff Layton
73caef2c12 mount.cifs: make local versions of strlcat and strlcpy static
...to silence -Wmissing-prototypes

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(This used to be commit fc7c71f15b)
2008-09-12 21:21:33 -04:00
Jeff Layton
56d5149dc6 cifs.upcall: make most functions static and silence compiler warnings
...to silence -Wmissing-prototypes and some uninit'ed variable
warnings. Thanks to GD for the extra-paranoid compiler flags.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(This used to be commit f0ee2c145f)
2008-09-12 21:13:54 -04:00
Jeremy Allison
cc5f51d5df Use the given name, not the absolute pathname, when printing out ACL info.
Make this match the non-ACL case.
Jeremy.
(This used to be commit e695c1cc2b)
2008-09-11 17:32:14 -07:00
Jeremy Allison
65ae60489d Fix bug #5751 cannot show ACLs on DFS reported by SATOH Fumiyasu <fumiyas@osstech.co.jp>.
Fix for smbclient and libsmbclient.
Jeremy.
(This used to be commit dbd5d6b145)
2008-09-11 16:20:59 -07:00
Jeremy Allison
d4818c70eb Clarify usage of "force create mode".
Jeremy.
(This used to be commit 1d252ffd31)
2008-08-28 16:06:23 -07:00
Volker Lendecke
228a12681b Add async smbecho client support
(This used to be commit c1d645fbe3)
2008-08-28 18:16:00 +02:00
Steve French
34c073c351 mount.cifs: unclear error message with "credentials"
Thanks to Christophe Curis for the suggestion
(This used to be commit 3b5ad9190d)
2008-08-27 17:00:00 -05:00
Jeff Layton
2ed60a4f6a cifs.upcall: bump SPNEGO msg version number and don't reject old versions
When we added the ability for the kernel to send sec=mskrb5 to the
upcall, we subtly broke old cifs.upcall versions that don't understand
it. Bump the spnego message version to 2 to make this clear. Also,
change cifs.upcall to not reject requests with a version that's lower
than the current one, and to send the reply with the same version that
the request sent. The idea is to try and keep cifs.upcall backward
compatible with old kernels.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(This used to be commit b868463015)
2008-08-22 13:29:16 -04:00
Jeff Layton
e1523fdce4 cifs.upcall: fix build warning
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(This used to be commit aa3443492c)
2008-08-21 21:21:48 -04:00
Jeff Layton
6cbebac514 cifs.upcall: handle MSKRB5 OID properly
When the kernel sends the upcall a sec=mskrb5 parameter, that means
the the MSKRB5 OID is preferred by the server. This patch fixes the
upcall to use that OID in place of the "normal" krb5 OID when it
gets a sec=mskrb5 parameter.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Steve French <smfrench@gmail.com>
(This used to be commit 6287e13b34)
2008-08-21 19:38:41 -04:00
Jeff Layton
3be3dac17d mount.cifs: don't prompt for password on krb5 mounts
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 c75791c34a)
2008-08-21 19:38:35 -04:00
Karolin Seeger
0d64a3b46d smbspool: Fix printing on port 139.
This one was introduced with 8eff35bc.
Thanks to Noèl Köthe for tracking that down!

Karolin
(This used to be commit 250f5a40d6)
2008-08-14 17:32:26 +02:00
Jeff Layton
1759f089e1 cifs.upcall: negatively instantiate keys on error
When a request-key upcall exits without instantiating a key, the kernel
will negatively instantiate the key with a 60s timeout. Older kernels,
however seem to also link that key into the session keyring. This
behavior can interefere with subsequent mount attempts until the
key times out. The next request_key() call will get this negative key
even if the upcall would have worked the second time.

Fix this by having cifs.upcall negatively instantiate the key itself
with a 1s timeout and don't attach it to the session keyring.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(This used to be commit f760dd3f31)
2008-08-12 14:32:54 -04:00
Jeremy Allison
617bf10c66 Fix bug #5675 with a varient of Tim Waugh's patch,
as proposed by James Peach.
Jeremy.
(This used to be commit 5c27ad7583)
2008-08-07 17:55:57 -07:00
Steve French
3b6c8bc662 Building cifs.upcall is giving this build warning:
client/cifs.upcall.c:205: warning: function declaration isn’t a prototype

This patch fixes this by properly declaring usage() args as void.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@samba.org>
(This used to be commit 148a012421)
2008-08-05 15:36:11 -05:00
Steve French
b893729a3d cifs.upcall: fix manpage and comments
The "cifs.resolver" key type has been changed to "dns_resolver". Fix
the comments at the top of cifs.upcall and the manpage accordingly.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@samba.org>
---
 docs-xml/manpages-3/cifs.upcall.8.xml |    4 ++--
 source/client/cifs.upcall.c           |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
(This used to be commit 24a93d03c2)
2008-08-05 13:27:07 -05:00
Steve French
70dccd1468 Backing out most of changeset 5222b8db3f
(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 92fad0fc53)
2008-08-05 13:15:46 -05:00
Steve French
0732750497 cifs.upcall was not recognizing the newer name "dns_resolver" key type
(as a synonym for the older "cifs.resolver" name) when resolving host
names to ip addresses for the kernel.

Acked-by: Jeff Layton
(This used to be commit 22c36b27c6)
2008-07-24 09:32:53 -05:00
Steve French
224f9b839b cifs.upcall: fix compile warning
Steve French noticed these warnings when building cifs.upcall:

   Compiling client/cifs.upcall.c
   client/cifs.upcall.c: In function 'usage':
   client/cifs.upcall.c:204: warning: declaration of 'prog' shadows a global declaration
   client/cifs.upcall.c:33: warning: shadowed declaration is here

Change the usage function to not take and arg and have it just use the global
"prog" variable. Fix a typo in the log message generated when an unknown
option is specified. Also getopt() always returns '?' when it sees an unknown
option so there's no point in printing it out.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(This used to be commit 4b8362f977)
2008-07-23 14:25:17 -05:00
Volker Lendecke
1335da2a7c Refactoring: Change calling conventions for cli_rpc_pipe_open_noauth
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit 9abc9dc4dc)
2008-07-20 17:37:11 +02:00
Jeremy Allison
cdabee2bb4 This patchset comprises a number of cleanups for the cifs upcall
binary. The biggest change is that it renames it from cifs.spnego
to cifs.upcall since the cifs.spnego name really isn't applicable
anymore.

It also fixes a segfault when the program is run without any args
and adds a manpage. Comments and/or suggestions appreciated.

This set should apply cleanly to the 3.3 test branch.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Jeremy.
(This used to be commit c633f10d9e)
2008-07-16 17:27:05 -07:00
Jeremy Allison
4b88ff157d Fix bug #5578, reported by sendel2000@hotbox.ru. Bad (non-Samba) use of strlcat gives error.
Jeremy.
(This used to be commit d7c82997bd)
2008-07-02 11:57:13 -07:00
Volker Lendecke
34dc60a74f Fix two IBM checker warnings
Steve, please check!

Thanks,

Volker
(This used to be commit 5222b8db3f)
2008-06-27 11:23:20 +02:00
Volker Lendecke
c8dfed63a6 Fix a brown paper bag segfault in clitar
Thanks to "No Body is Perfect" from gmail, whoever that is :-)

Volker
(cherry picked from commit 679d8dfa39)
(This used to be commit b8e1d62b8e)
2008-06-17 21:14:47 +02:00
Jeremy Allison
a991c5a7c3 Merge branch 'v3-3-test' of ssh://jra@git.samba.org/data/git/samba into v3-3-test
(This used to be commit 3d01248f63)
2008-05-30 10:09:22 -07:00
Jeremy Allison
2e9136e085 From Michael R Sweet <mike@easysw.com>.
All,

Noticed that smbspool.c still has my Easy Software Products copyright
on it.  The following patch fixes it to match the other code I've
contributed over the years...

Jeremy.
(This used to be commit 9f5897e28d)
2008-05-30 10:08:27 -07:00
Jeremy Allison
d36434f312 Security fix for CVE-2008-1105: Boundary failure when parsing SMB responses
can result in a buffer overrun.
Jeremy.
(This used to be commit 23b825e9d2)
2008-05-28 09:31:42 -07:00
Volker Lendecke
37aaa8d8f9 Remove stuff from client_proto.h
(This used to be commit c1e115964b)
2008-05-25 11:43:56 +02:00
Michael Adam
b398a96b09 rpc_client: use endpoint mapper to get the port for rpc_pipe_open_tcp().
Michael
(This used to be commit f7db445c82)
2008-05-22 11:29:57 +02:00
Kai Blin
59a6b2df74 client: Fix the proto header to fix the build.
(This used to be commit 9e39ac1cc3)
2008-05-22 09:43:50 +02:00
Michael Adam
7a1b7a14e4 smbclient: freeze client_proto.h from "make proto"
Michael
(This used to be commit f8c0710165)
2008-05-18 23:26:51 +02:00
Günther Deschner
4d8836ab96 Fix client authentication with -P switch in client tools (Bug 5435).
Guenther
(This used to be commit d077ef64cd)
2008-05-05 16:59:53 +02:00
Jeremy Allison
3cfd1f2be7 Tidyup to ensure '\n' is treated identically in all
cases.
Jeremy.
(This used to be commit 818fbc9889)
2008-05-01 08:48:52 -07:00
Jeremy Allison
e9accc2ad6 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.
(This used to be commit 41984743d9)
2008-05-01 08:39:16 -07:00
Jeremy Allison
17ade782b9 Sync up client/mount.cifs.c with v3-2-test.
Jeremy.
(This used to be commit 7a724d78e1)
2008-04-25 09:29:11 -07:00
Karolin Seeger
ea56d4a234 mount.cifs: Zero mountpassword content before freeing.
Karolin
(This used to be commit d99a31848b)
2008-04-25 12:40:54 +02:00
Jeremy Allison
9174e864fe 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.
(This used to be commit cc23f91d63)
2008-04-24 10:24:05 -07:00
James Peach
6db1eba547 smbspool: Fix the smbspool build.
(This used to be commit a51cb3c1a9)
2008-04-21 11:19:22 -07:00
James Peach
582d813d79 smbspool: minor formatting cleanups.
(This used to be commit 831a09ae25)
2008-04-21 10:57:09 -07:00
James Peach
ab4bf4e499 smbspool: Run indent to approximate conding standards.
(This used to be commit 4244be792e)
2008-04-21 10:10:29 -07:00
James Peach
65357898ba smbspool: add my copyright.
(This used to be commit b294b2055a)
2008-04-21 09:29:07 -07:00
Mike Sweet
9fb111ba5f smbspool: Fix CUPS authentication protocol support.
There were a couple of places where we weren't checking for
authentication correctly. This chance fixes those places and properly
supports Kerberos where available.
(This used to be commit 8eff35bc4a)
2008-04-21 09:19:51 -07:00
Mike Sweet
7e166858c3 smbspool: fix Kerberos support for CUPS 1.3.
To summarize the changes, the patches remove the old (probably non-
working) Kerberos support code which is unnecessary with CUPS 1.3
and adds some checks on the NT status we get back to see whether
the connection error is related to authentication.  If so, we send
the ATTR: message to tell CUPS we need a username and password and
return exit code 2 so cupsd will do the right thing.

AUTH_USERNAME, AUTH_PASSWORD, and KRB5CCNAME are set and supported
by CUPS 1.3.  The new exit code is supported by CUPS 1.2.x and 1.3,
and it treated as a general failure in CUPS 1.1.  The ATTR: message
is only supported by CUPS 1.3, while CUPS 1.2 will assume the
"username,password" value we are setting.

The current code only uses the AUTH_* env vars if they are set.
If not, we fall back to the previous behavior.

I really can't tell whether the Kerberos code that was in there
would work at all. It did not work for Mac OS X which is why
I dropped it.
(This used to be commit 8c12c5cea0)
2008-04-21 09:16:01 -07:00
Volker Lendecke
e73e8297f5 Replace cli_rpc_pipe_close by a talloc destructor on rpc_pipe_struct
(This used to be commit 99fc3283c4)
2008-04-20 14:08:16 +02:00
Volker Lendecke
2a2188591b Add "desthost" to rpc_pipe_client
This reduces the dependency on cli_state
(This used to be commit 783afab9c8)
2008-04-20 00:13:09 +02:00
Jeremy Allison
4939a24cbc Fix the problem when -L is used with IPv6 addresses. Don't try to
connect on port 139 with IPv6. Found by David Holder @ Erion.
Karolin please merge to 3.2-stable.
Jeremy.
(This used to be commit c003e66ff1)
2008-04-17 09:24:54 -07:00
Jeff Layton
161db3e8e8 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>
(This used to be commit e03d1dfdb8)
2008-03-31 16:05:20 -04:00
Volker Lendecke
8f6b03b673 More ssize_t->SMB_OFF_T
(This used to be commit 8dd6458049)
2008-03-28 15:32:02 +01:00
Marc VanHeyningen
e06aa46b9f Coverity fixes
(This used to be commit 3fc85d2259)
2008-03-17 20:52:25 +01:00
Volker Lendecke
82117aaaea Fix Coverity ID 563
dirmask is always set here, we've dereferenced it before anyway
(This used to be commit e6787aa133)
2008-03-15 22:30:25 +01:00
Volker Lendecke
fa495ce1c1 Fix Coverity ID 564
finfo1==NULL just does not happen in current code
(This used to be commit 9ea0078c31)
2008-03-15 22:30:25 +01:00
Günther Deschner
251a16c900 Use rpccli_srvsvc_NetShareEnumAll in smbclient.
Guenther
(This used to be commit 1121633652)
2008-03-10 04:33:06 +01:00
Derrell Lipman
914cd3e483 Eliminate global variable in_client and a plethora of extern declarations.
Derrell
(This used to be commit b7f34e7ef2)
2008-03-06 10:41:42 -05:00
Volker Lendecke
5193ae9b5a Change default bufsize to 512k
I did not do any scientific tests, but the dummy test on my laptop against a
w2k3 vmware shows that in this specific situation going beyond 512k seems not
to gain anything anymore.

smb: \> iosize 64512
iosize is now 64512
smb: \> lcd /dev
smb: \> get random null
getting file \random of size 104857600 as null (33453,1 kb/s) (average 19718,5 kb/s)
smb: \> get random null
getting file \random of size 104857600 as null (34236,0 kb/s) (average 20509,1 kb/s)
smb: \> iosize 524288
iosize is now 524288
smb: \> get random null
getting file \random of size 104857600 as null (49042,1 kb/s) (average 22521,9 kb/s)
smb: \> get random null
getting file \random of size 104857600 as null (49420,8 kb/s) (average 23432,9 kb/s)
smb: \> iosize 1048576
iosize is now 1048576
smb: \> get random null
getting file \random of size 104857600 as null (49420,8 kb/s) (average 24284,2 kb/s)
smb: \> get random null
getting file \random of size 104857600 as null (49136,3 kb/s) (average 25076,9 kb/s)
(This used to be commit 1bcfef6a90)
2008-03-06 13:28:23 +01:00
Volker Lendecke
a8003f1af2 Use io_bufsize as window size in smbclient get command
(This used to be commit e602f06cbb)
2008-03-06 13:28:23 +01:00
Volker Lendecke
6244578835 Add async cli_pull support
This is the big (and potentially controversial) one. It took a phone call to
explain to metze what is going on inside cli_pull_read_done, but I would really
like everybody to understand this function. It is a very good and reasonably
complex example of async programming. If we want more asynchronism in s3, this
is what we will have to deal with :-)

Make use of it in the smbclient "get" command.

Volker
(This used to be commit 76f9b360ee)
2008-03-06 13:28:23 +01:00
Volker Lendecke
a34d158880 Revert "Add async cli_pull support"
This reverts commit 844a163458.
(This used to be commit 5ab1cfda50)
2008-03-01 09:38:14 +01:00
Volker Lendecke
1c02bee829 Revert "Fix warnings"
This reverts commit 9a966e5593.
(This used to be commit 413695e8d0)
2008-03-01 09:38:14 +01:00
Volker Lendecke
b50eb31bb4 Fix warnings
(This used to be commit 9a966e5593)
2008-02-29 15:17:38 +01:00
Karolin Seeger
e1b32594c7 Remove smbmount.
Karolin
(This used to be commit 5fbd98f706)
2008-02-28 15:53:43 +01:00
Volker Lendecke
525aac775e Add async cli_pull support
This is the big (and potentially controversial) one. It took a phone call to
explain to metze what is going on inside cli_pull_read_done, but I would really
like everybody to understand this function. It is a very good and reasonably
complex example of async programming. If we want more asynchronism in s3, this
is what we will have to deal with :-)

Make use of it in the smbclient "get" command.

Volker
(This used to be commit 844a163458)
2008-02-28 15:27:55 +01:00
Volker Lendecke
c7522804a5 Do the formatting change in all 3 places :-)
(This used to be commit d32066eaef)
2008-02-25 09:55:53 +01:00
Volker Lendecke
90ad42fad3 Fix confusing error message -- bug 5252
Thanks to Walter Franzini
(This used to be commit 19de47fef1)
2008-02-25 09:51:33 +01:00
Simo Sorce
d88e40106f Make sure mount.cifs.c compiles on Fedora 9 with gcc 4.3
(This used to be commit ce57d38825)
2008-02-22 14:10:28 -05:00
Tim Potter
2cd374db8d Replace C++-style comments with C.
(This used to be commit a1d0746923)
2008-02-18 10:15:22 +01:00
Simo Sorce
31e5116a88 Revert "Merge in J.Layton patch and resolve conflict."
This reverts commit 6b1a118eaa.

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 c5b7d538ec)
2008-02-14 12:03:32 -05:00
Jeremy Allison
7a694af2f4 Fix bug #5247 "Wildcard expansion in mget is broken"
for 3.2.
Jeremy.
(This used to be commit 69aa076620)
2008-02-08 16:59:52 -08:00
Volker Lendecke
88c27f83d4 Convert receive_smb_raw to NTSTATUS
(This used to be commit ba771bd858)
2008-02-02 11:03:23 +01:00
Volker Lendecke
b679dda6c9 Fix bogus uninitialized variable warnings
(This used to be commit 71d6580c83)
2008-01-25 21:20:39 +01:00
Volker Lendecke
ba6c78c355 Fix Coverity ID 463
(This used to be commit 21d126c56a)
2008-01-24 16:31:55 +01:00
Volker Lendecke
587cf54c61 strtok -> strtok_r
(This used to be commit fd34ce4370)
2008-01-23 15:08:04 +01:00
Jeremy Allison
b97fbf5888 Fix error message for new allinfo command.
Jeremy.
(This used to be commit 3a1bcbfa7c)
2008-01-18 13:47:10 -08:00
Volker Lendecke
3d3d6e7020 Add the "allinfo" command to smbclient
Modeled after the Samba4 allinfo command
(This used to be commit 3fa0cf3fe5)
2008-01-18 11:08:17 +01:00
Igor Mammedov
94fdd59f1c Adds support for cifs.resolver upcall.
Here is a patch for userspace cifs.spnego handler that adds support for cifs.resolver
upcall used in DFS code.
Any comments are appreciated.

#############################

Cifs upcall with key type cifs.resolver is used for resolving
server names in handling DFS refferals.

Signed-off-by: Igor Mammedov <niallain@gmail.com>
(This used to be commit dfc80b4f1c)
2008-01-16 09:51:06 -05:00
Karolin Seeger
1ac5e6cdfe Correct comment. Default debug level of smbclient is 1, not 0.
(This used to be commit 9c81125e6d)
2008-01-09 12:21:44 +01:00
Steve French
56a8ef0bbb Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test
(This used to be commit d3b91e494c)
2008-01-05 14:51:23 -06:00
Jeremy Allison
722d288d21 Use the common -e option not the custom one.
Jeremy.
(This used to be commit ef1bbcdfb9)
2008-01-05 00:46:04 -08:00
Jeremy Allison
9baa97a46e Add general '-e' option to enable smb encryption
on tools.
Jeremy.
(This used to be commit 757653966f)
2008-01-05 00:23:35 -08:00
Jeremy Allison
01afb07321 Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit 3a45f62310)
2008-01-04 19:06:37 -08:00
Jeremy Allison
058ba641f3 Fix idle client reading keepalive.
Jeremy.
(This used to be commit 4ce0bf7856)
2008-01-04 14:56:56 -08:00
Jeremy Allison
9254bb4ef1 Refactor the crypto code after a very helpful conversation
with Volker. Mostly making sure we have data on the incoming
packet type, not stored in the smb header.
Jeremy.
(This used to be commit c4e5a50504)
2008-01-04 12:56:23 -08:00
Steve French
8122eb767a Update mount.cifs help
Steve
(This used to be commit b9d2da4d10)
2008-01-03 17:13:38 -06:00
Jeremy Allison
06f80cf8be We may use 127k read/write for encrypted connections.
Jeremy.
(This used to be commit 656c9d0844)
2007-12-30 18:05:33 -08:00
Jeremy Allison
f04daa682a Fix error message.
Jeremy.
(This used to be commit a0494b115b)
2007-12-29 22:42:20 -08:00
Jeremy Allison
6d9b2439d2 Added -e, --encrypt option to smbclient that immediately
forces encrypted smb after initial connect. Will document
for 3.2 official release.
Jeremy.
(This used to be commit f02bf41928)
2007-12-29 22:39:52 -08:00
Jeremy Allison
afce2b245a Add the capability to set "smb encrypt = required"
on a share (or global) and have the server reply with
ACCESS_DENIED for all non-encrypted traffic (except
that used to query encryption requirements and set
encryption state).
Jeremy.
(This used to be commit d241bfa577)
2007-12-27 23:51:03 -08:00
Jeremy Allison
afc93255d1 Add SMB encryption. Still fixing client decrypt but
negotiation works.
Jeremy.
(This used to be commit d78045601a)
2007-12-26 17:12:36 -08:00
Volker Lendecke
bea1659911 Remove next_token_nr_talloc and its associated global
Only client.c and clitar.c used this, I think they should carry the static
themselves. Also move the a bit funny routine toktocliplist to clitar.c, the
only place where it is used.
(This used to be commit 86d9412611)
2007-12-21 09:58:20 +01:00
Volker Lendecke
042201bcc1 Fix a "no prototype" warning
(This used to be commit e5bd32812d)
2007-12-19 20:48:45 +01:00
Rishi Srivatsavai
bf2c5e2bde Add smbclient support for basic mDNS browsing.
Patch from Rishi Srivatsavai (bugzilla #4150), with tallocification
and minor syle changes by me.
(This used to be commit db74b99d0e)
2007-12-17 22:09:09 -08:00
Simo Sorce
d20608c8f3 Merge in J.Layton patch and resolve conflict.
(This used to be commit 6b1a118eaa)
2007-12-17 09:43:18 -05:00
Karolin Seeger
6a364ce330 Revert smbclient changes.
Patch broke option -p.
Sorry for breaking the build!

Karolin
(This used to be commit 81dab4145f)
2007-12-14 12:08:30 +01:00
Karolin Seeger
4d7a337d52 Make smbclient to display error message and usage in the case of invalid options.
(This used to be commit 04131b26de)
2007-12-14 11:20:27 +01:00
Jeremy Allison
138333ed1f We don't need to call endpwent if we never call getpwent.
Jeremy.
(This used to be commit 27078d1292)
2007-12-13 17:25:26 -08:00
Jeremy Allison
03ccaab05f 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.
(This used to be commit 7fad5f38ea)
2007-12-13 17:18:48 -08:00
Jeremy Allison
96591dd868 Missed one strcpy call.
Jeremy.
(This used to be commit b215fb1ad0)
2007-12-12 19:12:18 -08:00
Jeremy Allison
48081e07a3 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.
(This used to be commit eff2b368e8)
2007-12-12 19:06:04 -08:00