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

812 Commits

Author SHA1 Message Date
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