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

778 Commits

Author SHA1 Message Date
Volker Lendecke
c1e115964b Remove stuff from client_proto.h 2008-05-25 11:43:56 +02:00
Michael Adam
f7db445c82 rpc_client: use endpoint mapper to get the port for rpc_pipe_open_tcp().
Michael
2008-05-22 11:29:57 +02:00
Kai Blin
9e39ac1cc3 client: Fix the proto header to fix the build. 2008-05-22 09:43:50 +02:00
Michael Adam
f8c0710165 smbclient: freeze client_proto.h from "make proto"
Michael
2008-05-18 23:26:51 +02:00
Günther Deschner
d077ef64cd Fix client authentication with -P switch in client tools (Bug 5435).
Guenther
2008-05-05 16:59:53 +02:00
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
James Peach
a51cb3c1a9 smbspool: Fix the smbspool build. 2008-04-21 11:19:22 -07:00
James Peach
831a09ae25 smbspool: minor formatting cleanups. 2008-04-21 10:57:09 -07:00
James Peach
4244be792e smbspool: Run indent to approximate conding standards. 2008-04-21 10:10:29 -07:00
James Peach
b294b2055a smbspool: add my copyright. 2008-04-21 09:29:07 -07:00
Mike Sweet
8eff35bc4a 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.
2008-04-21 09:19:51 -07:00
Mike Sweet
8c12c5cea0 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.
2008-04-21 09:16:01 -07:00
Volker Lendecke
99fc3283c4 Replace cli_rpc_pipe_close by a talloc destructor on rpc_pipe_struct 2008-04-20 14:08:16 +02:00
Volker Lendecke
783afab9c8 Add "desthost" to rpc_pipe_client
This reduces the dependency on cli_state
2008-04-20 00:13:09 +02:00
Jeremy Allison
c003e66ff1 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.
2008-04-17 09:24:54 -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
8dd6458049 More ssize_t->SMB_OFF_T 2008-03-28 15:32:02 +01:00
Marc VanHeyningen
3fc85d2259 Coverity fixes 2008-03-17 20:52:25 +01:00
Volker Lendecke
e6787aa133 Fix Coverity ID 563
dirmask is always set here, we've dereferenced it before anyway
2008-03-15 22:30:25 +01:00
Volker Lendecke
9ea0078c31 Fix Coverity ID 564
finfo1==NULL just does not happen in current code
2008-03-15 22:30:25 +01:00
Günther Deschner
1121633652 Use rpccli_srvsvc_NetShareEnumAll in smbclient.
Guenther
2008-03-10 04:33:06 +01:00
Derrell Lipman
b7f34e7ef2 Eliminate global variable in_client and a plethora of extern declarations.
Derrell
2008-03-06 10:41:42 -05:00
Volker Lendecke
1bcfef6a90 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)
2008-03-06 13:28:23 +01:00
Volker Lendecke
e602f06cbb Use io_bufsize as window size in smbclient get command 2008-03-06 13:28:23 +01:00
Volker Lendecke
76f9b360ee 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
2008-03-06 13:28:23 +01:00
Volker Lendecke
5ab1cfda50 Revert "Add async cli_pull support"
This reverts commit 844a163458c7585e4306a21ffdae5d08e03d6e4d.
2008-03-01 09:38:14 +01:00
Volker Lendecke
413695e8d0 Revert "Fix warnings"
This reverts commit 9a966e5593ae4474014aec5d8c68c489ac8ce0c9.
2008-03-01 09:38:14 +01:00
Volker Lendecke
9a966e5593 Fix warnings 2008-02-29 15:17:38 +01:00
Karolin Seeger
5fbd98f706 Remove smbmount.
Karolin
2008-02-28 15:53:43 +01:00
Volker Lendecke
844a163458 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
2008-02-28 15:27:55 +01: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
Tim Potter
a1d0746923 Replace C++-style comments with C. 2008-02-18 10:15:22 +01: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
Jeremy Allison
69aa076620 Fix bug #5247 "Wildcard expansion in mget is broken"
for 3.2.
Jeremy.
2008-02-08 16:59:52 -08:00
Volker Lendecke
ba771bd858 Convert receive_smb_raw to NTSTATUS 2008-02-02 11:03:23 +01:00
Volker Lendecke
71d6580c83 Fix bogus uninitialized variable warnings 2008-01-25 21:20:39 +01:00
Volker Lendecke
21d126c56a Fix Coverity ID 463 2008-01-24 16:31:55 +01:00
Volker Lendecke
fd34ce4370 strtok -> strtok_r 2008-01-23 15:08:04 +01:00
Jeremy Allison
3a1bcbfa7c Fix error message for new allinfo command.
Jeremy.
2008-01-18 13:47:10 -08:00
Volker Lendecke
3fa0cf3fe5 Add the "allinfo" command to smbclient
Modeled after the Samba4 allinfo command
2008-01-18 11:08:17 +01:00
Igor Mammedov
dfc80b4f1c 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>
2008-01-16 09:51:06 -05:00
Karolin Seeger
9c81125e6d Correct comment. Default debug level of smbclient is 1, not 0. 2008-01-09 12:21:44 +01:00
Steve French
d3b91e494c Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test 2008-01-05 14:51:23 -06:00
Jeremy Allison
ef1bbcdfb9 Use the common -e option not the custom one.
Jeremy.
2008-01-05 00:46:04 -08:00