1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00
Commit Graph

1780 Commits

Author SHA1 Message Date
Volker Lendecke
aa0dff680d r10671: Attempt to fix the build on machines without kerberos headers.
Volker
(This used to be commit cb816e65a9)
2007-10-10 11:04:49 -05:00
Gerald Carter
54abd2aa66 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)
(This used to be commit 939c3cb5d7)
2007-10-10 11:04:48 -05:00
Jeremy Allison
c2e5ce1501 r10269: Server-side fix for creds change - revert jcmd's change.
Jeremy.
(This used to be commit e1c9813d63)
2007-10-10 11:03:40 -05:00
Jeremy Allison
f94d982646 r10217: Remember to exit correctly when we find a matching entry to change.
Jeremy.
(This used to be commit 142c84eb31)
2007-10-10 11:03:38 -05:00
Jeremy Allison
6a8ce7487b r10215: Fix several memory corruption bugs now we're testing this.
Jeremy.
(This used to be commit 3d1207aaf6)
2007-10-10 11:03:38 -05:00
Günther Deschner
2d878a4b6d r10210: Fix memleak.
Guenther
(This used to be commit 10358d16d7)
2007-10-10 11:03:37 -05:00
Jeremy Allison
c2f9fdcb46 r10204: I love valgrind :-). Found stupid missing parantheses :-).
Jeremy.
(This used to be commit b406a20212)
2007-10-10 11:03:36 -05:00
Gerald Carter
dade4d9e95 r10176: adding smbctool from Kalim's SoC project; requires make bin/smbctool
(This used to be commit 79fcc3bb7b)
2007-10-10 11:03:35 -05:00
Jeremy Allison
b03137d568 r10150: Fix from Steve Williams <steve@celineandsteve.com> to make the args
consistent (uint64_t).
Jeremy.
(This used to be commit 08de726172)
2007-10-10 11:03:34 -05:00
Jeremy Allison
1ff0de8b6d r10135: Remove external dependencies for libsmbsharemodes.so
Jeremy.
(This used to be commit 2521ae826f)
2007-10-10 11:03:33 -05:00
Jeremy Allison
dcf4bc5e7f r10054: Actually use the given db path (:-)
Jeremy.
(This used to be commit ac7cf320df)
2007-10-10 11:03:31 -05:00
Jeremy Allison
34721ad233 r10042: Add in external LGPL library for accessing the share mode db. Allow
others to examine & test. May not end up here eventually...
Jeremy.
(This used to be commit 7cc70ae633)
2007-10-10 11:03:31 -05:00
Gerald Carter
a44e97c99f r10001: adding in libmsrpc from Chris Nicholls (SoC project). not built by default per conversation with Jeremy until the rpc changes from trunk are merged back
(This used to be commit e813de1e52)
2007-10-10 11:03:30 -05:00
Günther Deschner
ce3b4a1079 r9958: revert last commit.
Guenther
(This used to be commit 351c783295)
2007-10-10 11:03:29 -05:00
Günther Deschner
a451584b2a r9955: Fix misleading comments.
Guenther
(This used to be commit 0c3b7499d4)
2007-10-10 11:03:29 -05:00
Gerald Carter
f02a98d9b6 r9590: forget to remove this from the 3.0 tree
(This used to be commit 74f8718438)
2007-10-10 11:03:22 -05:00
Gerald Carter
dab71bed4e r9588: remove netsamlogon_cache interface...everything seems to work fine. Will deal with any fallout from special environments using a non-cache solution
(This used to be commit e1de6f238f)
2007-10-10 11:03:22 -05:00
Jim McDonough
7fff6638fc r9112: Fix #2953 - credentials chain on DC gets out of sync with client when
NT_STATUS_NO_USER returned.  We were moving to the next step in the
chain when the client wasn't.  Only update when the user logs on.
(This used to be commit b01a3a4111)
2007-10-10 11:00:26 -05:00
Tim Potter
ab398643a4 r8572: Remove crufty #define NO_SYSLOG as it's not used at all anymore.
(This used to be commit 985dbb47d9)
2007-10-10 11:00:11 -05:00
Gerald Carter
a3a8517216 r8475: BUG 2872: fix cut-n-paste error when checking pointer value in ntlmssp_set_workstation()
(This used to be commit f1763c5dec)
2007-10-10 11:00:06 -05:00
Jeremy Allison
af8a691db1 r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the torture
tests on this as it's very late NY time (just wanted to get this work
into the tree). I'll test this over the weekend....
Jerry - in looking at the difference between the two trees there
seem to be some printing/ntprinting.c and registry changes we might
want to examine to try keep in sync.
Jeremy.
(This used to be commit c7fe18761e)
2007-10-10 10:58:18 -05:00
Gerald Carter
38e006fe8b r8184: fix build issue on Solaris in smbclient
(This used to be commit 137d270ee3)
2007-10-10 10:58:15 -05:00
Volker Lendecke
3a8af94424 r8093: Next round. Now it compiles with --enable-socket-wrapper.
Volker
(This used to be commit 25cbcfba30)
2007-10-10 10:58:11 -05:00
Gerald Carter
0a01b2246a r8064: * add the REG_XXX error codes to the pretty error messages
* more work on the store_values() functions for the Printers key
* add Control\Print\Monitors key to list for reg_db
(This used to be commit 89f17b41ce)
2007-10-10 10:58:10 -05:00
Jeremy Allison
600935af49 r7954: Fix from tridge from Samba4 (same code exists here) :
fixed handling of ASN.1 objects bigger than 64k
Jeremy.
(This used to be commit 0da60e9954)
2007-10-10 10:58:04 -05:00
Jeremy Allison
19ca97a70f r7882: Looks like a large patch - but what it actually does is make Samba
safe for using our headers and linking with C++ modules. Stops us
from using C++ reserved keywords in our code.
Jeremy
(This used to be commit 9506b8e145)
2007-10-10 10:58:00 -05:00
Derrell Lipman
3005405b52 r7817: Eliminate use of ctime_r() in libsmbclient DEBUG statement. It seems that
ctime_r() takes different parameters on Solaris than it does on Linux, and
it's easier to just eliminate the use of it than to write a configure test.
(This used to be commit 513ea79b2e)
2007-10-10 10:57:21 -05:00
Günther Deschner
3f657f41cc r7606: add WERR_NET_NAME_NOT_FOUND. This is what windows returns when
trying to manipulate non-existing shares.

Guenther
(This used to be commit 2e5cb531ab)
2007-10-10 10:57:15 -05:00
Jeremy Allison
33a4c0b5a1 r7554: Refactor very messy code in util_sock.c Remove write_socket_data/read_socket_data
as they do nothing that write_socket/read_socket don't do. Add a more useful
error message when read_socket/write_socket error out on the main client fd
for a process (ie. try and list the IP of the client that errored).
Jeremy.
(This used to be commit cbd7578e7c)
2007-10-10 10:57:13 -05:00
Gerald Carter
46c94b2659 r7472: fix smbpasswd user password change (still worked by bad error messages) due to trying to strdup a NULL pointer
(This used to be commit a48ff479dd)
2007-10-10 10:57:10 -05:00
Gerald Carter
fed660877c r7415: * big change -- volker's new async winbindd from trunk
(This used to be commit a0ac9a8ffd)
2007-10-10 10:57:08 -05:00
Günther Deschner
4bc39f05b7 r7391: - Added client-support for various lsa_query_trust_dom_info-calls and a
rpcclient-tester for some info-levels.

  Jerry, I tried to adopt to prs_pointer() where possible and to not
  interfere with your work for usrmgr.

- Add "net rpc trustdom vampire"-tool.

  This allows to retrieve Interdomain Trust(ed)-Relationships from
  NT4-Servers including cleartext-passwords (still stored in the local
  secrets.tdb).

  The net-hook was done in cooperation with Lars Mueller
  <lmuelle@suse.de>.

  To vampire trusted domains simply call:

        net rpc trustdom vampire -S nt4dc -Uadmin%pass

Guenther
(This used to be commit 5125852939)
2007-10-10 10:57:07 -05:00
Gerald Carter
7344cc3ba4 r7339: only check for dfs proxy referrals when the server supports dfs
(This used to be commit 9e93244fa5)
2007-10-10 10:57:06 -05:00
Derrell Lipman
bf484a8f8e r7245: bug fixes in libsmbclient, setting time attributes
(This used to be commit bf33902c05)
2007-10-10 10:57:05 -05:00
Derrell Lipman
2efe68918d r7175: fix incorrect comment
(This used to be commit 6f951c863e)
2007-10-10 10:57:04 -05:00
Derrell Lipman
f3ad9323c6 r7172: This is the proper fix for setting file times from libsmbclient. We now
try setpathinfo, and if that doesn't work (e.g. on win98), revert to the
previous slower method.
(This used to be commit 6c05812bd9)
2007-10-10 10:57:04 -05:00
Derrell Lipman
e317034997 r7168: Updating file times from libsmbclient was not working for win98. Although
the function that was being used to set attributes is a core protocol
function (SMBsetatr = 0x09), it does not appear to work on win98.  As a
temporary measure, when file times are to be set, this version opens the
file and uses SMBsetattrE = 0x22 instead.  (The other advantage of this
function over the original one is that it supports setting access time as
well as modification time.)

The next step, the proper solution if it can be made to work, is to write
functions that use TRANS2_SET_PATH_INFO instead.
(This used to be commit bab0bf7f4f)
2007-10-10 10:57:04 -05:00
Jeremy Allison
0100bb0eb6 r7157: Ensure we abort a directory listing if we see the same
name twice between packets.
Jeremy.
(This used to be commit f9063b383e)
2007-10-10 10:57:04 -05:00
Jeremy Allison
57fa7e1547 r7151: Fix for bug #2698. If a unicode to unix charset conversion fails (due to buggy iconv?) we can
be left with a filename that doesn't exist on the remote machine. If we then do a findnext
with this file the server gets confused and restarts from the beginning of the directory,
causing directory listing loops. Fix this by keeping a copy of the "raw" filename data and
length and using this as the argument to findnext. This won't fix the incorrect iconv
conversion into the finfo struct but at least it ensures that directory listings always
terminate. Tested against NTFS and FAT directories.
Jeremy.
(This used to be commit 848940d5a9)
2007-10-10 10:57:03 -05:00
Gerald Carter
f24d88cf9d r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1
(This used to be commit 9727d05241)
2007-10-10 10:57:02 -05:00
Jeremy Allison
e9b511a32d r7033: Call a spade a spade :-).
Jeremy.
(This used to be commit f5027f6370)
2007-10-10 10:57:00 -05:00
Jeremy Allison
26e12ebd07 r7031: Added encrypt/decrypt function for LSA secrets and trusted
domain passwords on the wire.
Jeremy.
(This used to be commit f82dcac25f)
2007-10-10 10:57:00 -05:00
Jeremy Allison
45d03e327a r6994: Fix for bugid #2729 - it turns out resume keys are *mandatory* for
a search when listing a W2K and above server from a FATxx filesystem
only. Thanks to Steve Langasek <vorlon@debian.org> for giving me the
essential info that allowed me to reproduce and thus fix this.
Jeremy.
(This used to be commit 8227675d3d)
2007-10-10 10:56:59 -05:00
Derrell Lipman
d5e18ed8fd r6753: Fixes bug 2663. cli_getattrE() and cli_setattrE() were not formatting or
parsing the timestamp values correctly.  It turns out they were using the
incorrect function for formatting and parsing values.  Thanks to Satwik Hebbar
for reporting this and testing the patch.
(This used to be commit 9144778d09)
2007-10-10 10:56:53 -05:00
Gerald Carter
5d5d596206 r6706: * fix bug that prevented smbclient from creating directories
on non-dfs paths
* add patch from James Peach to remove use of uninitialized
  variables
(This used to be commit c71f20f1ae)
2007-10-10 10:56:52 -05:00
Gerald Carter
6a3a0766d5 r6685: smbclient fixes
* BUG 2680: copy files from an MSDFS win2k root share
* BUG 2688: re-implement support for the -P (--port) option
* support connecting to an 'msdfs proxy' share on a Samba server
(This used to be commit 9e3e473632)
2007-10-10 10:56:51 -05:00
Jeremy Allison
7b9d6ac23e r6595: This is Volkers new-talloc patch. Just got the go-ahead from
Volker to commit. Woo Hoo !
Jeremy.
(This used to be commit 316df944a4)
2007-10-10 10:56:46 -05:00
Herb Lewis
1c4bbe0654 r6586: get rid of a few more compiler warnings
(This used to be commit 173375f8d8)
2007-10-10 10:56:46 -05:00
Steve French
d7173b35e9 r6447: Add missing error mapping for EMLINK to NT_STATUS_TOO_MANY_LINKS (we have it the other direction
in clierror already).  This fixes the return code when we try to hardlink from a client.
(This used to be commit ccbdffb94e)
2007-10-10 10:56:41 -05:00
Derrell Lipman
1d08b9013a r6392: - Fixes bug 2564: when smbc_opendir() was called with a file rather than
a directory, the errno returned could end up as ENOENT rather than ENOTDIR.

- Fixes some compiler warnings which showed up on IRIX, as reported by
  James Peach.
(This used to be commit 615a62b21f)
2007-10-10 10:56:40 -05:00
Volker Lendecke
1875e46d05 r6275: Implement RAP version of enumusers/enumgroups level 0. No, I've not gone mad,
this is to test future changes to enumeration functions...

This can successfully list users from nt4 and w2k3sp1.

Volker
(This used to be commit c73f2656fd)
2007-10-10 10:56:34 -05:00
Herb Lewis
978ca84860 r6225: get rid of warnings from my compiler about nested externs
(This used to be commit efea76ac71)
2007-10-10 10:56:30 -05:00
Derrell Lipman
523ba5ed32 r6156: Fixes bug #2543. Properly cache anonmous username when reverting to anonymous login, in libsmbclient.
(This used to be commit cf2dcc1108)
2007-10-10 10:56:25 -05:00
Derrell Lipman
8de11f06df r6155: Fixes bug #1133
Added provision for overloading some global configuration options via the new,
per-user file ~/.smb/smb.conf.append which is read after the global config
file is read (and only if the global config file was read).  This leave the
original, BC behavior of ~/.smb/smb.conf which, if found, is read but causes
the global config file to not be read.

Also fixed a potential seg fault in to lp_dump_one().
(This used to be commit 2c5a6305bd)
2007-10-10 10:56:25 -05:00
Derrell Lipman
9840db418b r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control
   entities in the ACL without getting all other NT attributes.
2. added the ability to exclude specified attributes from the result set
   provided by smbc_getxattr() et al, when requesting all attributes,
   all NT attributes, or all DOS attributes.
3. eliminated all compiler warnings, including when --enable-developer
   compiler flags are in use.  removed -Wcast-qual flag from list, as that
   is specifically to force warnings in the case of casting away qualifiers.

Note: In the process of eliminating compiler warnings, a few nasties were
      discovered.  In the file libads/sasl.c, PRIVATE kerberos interfaces
      are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED
      kerberos interfaces are being used.  Someone who knows kerberos
      should look at these and determine if there is an alternate method
      of accomplishing the task.
(This used to be commit 994694f7f2)
2007-10-10 10:56:24 -05:00
Derrell Lipman
934d41d239 r6127: Eliminated all compiler warnings pertaining to mismatched "qualifiers". The
whole of samba comiles warning-free with the default compiler flags.

Temporarily defined -Wall to locate other potential problems.  Found an
unused static function (#ifdefed out rather than deleted, in case it's
needed for something in progress).

There are also a number of uses of undeclared functions, mostly krb5_*.
Files with these problems need to have appropriate header files included,
but they are not fixed in this update.

oplock_linux.c.c has undefined functions capget() and capset(), which need
to have "#undef _POSIX_SOURCE" specified before including <sys/capability.h>,
but that could potentially have other side effects, so that remains uncorrected
as well.

The flag -Wall should be added permanently to CFLAGS, and all warnings then
generated should be eliminated.
(This used to be commit 5b19ede88e)
2007-10-10 10:56:24 -05:00
Derrell Lipman
1635d50a20 r6125: smbc_stat() returned incorrect timestamps IFF it used cli_qpathinfo2() to
retrieve the timestamps (Win2k) and not if it used cli-getatr() to retrieve
the timestamps (Win98).  Timestamps are supposed to be in GMT, and should
not have serverzone deducted from them in cli_qpathinfo2().
(This used to be commit 443d8df94c)
2007-10-10 10:56:23 -05:00
Jeremy Allison
3fb8308072 r6120: Added "volume" command to smbclient that prints out the volume name and
serial number.
Jeremy.
(This used to be commit c69623072e)
2007-10-10 10:56:23 -05:00
Derrell Lipman
0411d1a735 r6102: add support for opening a file for write with O_APPEND in libsmbclient
(This used to be commit 542922cb2e)
2007-10-10 10:56:21 -05:00
Gerald Carter
66e8ed2632 r6051: finish off
net rpc service stop
        net rpc service start
        net rpc service pause
        net rpc service resume
(This used to be commit a7fb2c50b0)
2007-10-10 10:56:19 -05:00
Gerald Carter
259d44dbb2 r6038: adding more flesh to 'net rpc service'
open and close the service control manager.

Also experimenting with ideas for cli_xxx() interface.
(This used to be commit 4da89ef17b)
2007-10-10 10:56:17 -05:00
Gerald Carter
97978aa865 r5994: proper fix for smbclient and win98 file servers; check the WCT value in the tcon&X reply before setting the cli_state->dfsroot flag
(This used to be commit d3822d889d)
2007-10-10 10:56:14 -05:00
Jeremy Allison
7478d77b31 r5991: Fixup last entry offset correctly for level 260.
Should fix bug found by Derrell.Lipman@UnwiredUniverse.com.
Jeremy.
(This used to be commit 5ded615679)
2007-10-10 10:56:14 -05:00
Jeremy Allison
a17af5920a r5981: Hack to fix DFS code to work with Win98 server. JERRY PLEASE REVIEW THIS !
I don't think this is correct - it just happens to work and fix bug #2530
to return all the files.
Jeremy.
(This used to be commit 1ee180a6dd)
2007-10-10 10:56:14 -05:00
Jeremy Allison
656140bf4b r5975: Re-arrange code and comments to make more sense.
Jeremy.
(This used to be commit 08616ad80d)
2007-10-10 10:56:14 -05:00
Jeremy Allison
47f58beb28 r5973: Fix up overwrite of last 2 bytes on clilist (could cause coredump).
Jeremy.
(This used to be commit b0de2d761f)
2007-10-10 10:56:14 -05:00
Jeremy Allison
f8f090ad24 r5970: Fix old bug where ff_searchcount was being compared -1 ! This caused a
filename to be processed twice.
Jeremy.
(This used to be commit 2ed7e30cbb)
2007-10-10 10:56:13 -05:00
Gerald Carter
b3e57cb3ff r5968: derrell's large file fix for libsmbclient (BUG 2505)
(This used to be commit 85be4c5df3)
2007-10-10 10:56:13 -05:00
Jeremy Allison
b360f556a5 r5967: Fix typo bug where flags overwrote info level.
Jeremy.
(This used to be commit 214a2cbe5a)
2007-10-10 10:56:13 -05:00
Gerald Carter
93e04e941e r5961: final round of compiler warning fixes based on feedback from Jason Mader
(This used to be commit 9e77da9320)
2007-10-10 10:56:13 -05:00
Gerald Carter
0d57995304 r5953: more compiler cleanups; moved SID_LIST from smb.h to privileges.c to cleanup the name space
(This used to be commit 7dfafa712d)
2007-10-10 10:56:11 -05:00
Gerald Carter
4b831f8e16 r5952: BUG 2469: patch from Jason Mader to cleanup compiler warning when not using krb5
(This used to be commit 19a639ac46)
2007-10-10 10:56:11 -05:00
Gerald Carter
9a4e3f7e6f r5851: BUG 2456: reported by Jason Mader; remove non standard pragma (my fault); should fix some builds with non-gcc compilers
(This used to be commit 300150a1be)
2007-10-10 10:56:05 -05:00
Jeremy Allison
3fc141baac r5840: Fix findfirst/findnext with protocol level < NT1.
Jeremy.
(This used to be commit d53b5891a7)
2007-10-10 10:56:04 -05:00
Jeremy Allison
7069d481c0 r5835: Make smbclient obey the max protocol argument again.
Jeremy.
(This used to be commit 7cb9618e5d)
2007-10-10 10:56:04 -05:00
Gerald Carter
d177f1bc8f r5806: * fix a couple more segvs in spoolss
* comment out unused variable after jra's change to revert the 56bit des
  smb signing changes
(This used to be commit 13ed08cd2a)
2007-10-10 10:56:02 -05:00
Jeremy Allison
3b7dccf076 r5804: Revert the signing change by Nalin Dahyabhai <nalin@redhat.com>.
Seems to be incorrect (several user reports).
Jeremy.
(This used to be commit 0abfb67c79)
2007-10-10 10:56:01 -05:00
Gerald Carter
51310680ce r5752: implement derrell's solution for binary compatibilty in the _SMBCCTX structure; note that we break compat with 3.0.11 but are ok with earlier versions
(This used to be commit 6e8d171551)
2007-10-10 10:55:59 -05:00
Gerald Carter
44f1a1a510 r5738: fix my build breakage; fix a few compiler warnings
(This used to be commit acbe9efeb6)
2007-10-10 10:55:58 -05:00
Gerald Carter
9d65e07784 r5735: rest of derrel's patch for BUG 2308; had to move the options structure from the _SMBCCTX to the internals structure to maintain binary compatibility (derrel, we should talk more about this)
(This used to be commit a5ea01bf15)
2007-10-10 10:55:58 -05:00
Gerald Carter
82379c7bd1 r5729: partial fixes for BUG 2308; libsmbclient patches from Derrell Lipman <derrell.lipman@unwireduniverse.com>
(This used to be commit 88678bc05c)
2007-10-10 10:55:58 -05:00
Jeremy Allison
4a62d418d9 r5723: Add missing part of fix for #2271. After analysing the actions of a XP
client against a Samba server. It never uses the "continue" flag, but always
does "new search, continue from this file" instead. Change our client code
to do the same (it appears that's all they test in W2K etc.).
Jeremy.
(This used to be commit 710bceee32)
2007-10-10 10:55:57 -05:00
Jeremy Allison
9d23e37a6f r5702: Fix bug #2271. Correctly pull out and use resume names in a
directory listing (we were incorrectly understanding what was
returned in the "last name" entry).
Jeremy.
(This used to be commit 4f2da9ecf1)
2007-10-10 10:55:55 -05:00
Volker Lendecke
4eed5ad016 r5657: Fix uninitialized variable warning
(This used to be commit f74737ce57)
2007-10-10 10:55:54 -05:00
Gerald Carter
fb84318c34 r5578: get 'recurse; dir' working across multiple levels of dfs referrals
note that this does not handle the situation where the same \\server\share
is mounted mutliple times in the dfs tree since I store a single mount
path per struct cli_state *
(This used to be commit 52c82b51ba)
2007-10-10 10:55:48 -05:00
Gerald Carter
96572957fc r5577: get recurse; dir working across single level dfs referrals
(This used to be commit d4443807bc)
2007-10-10 10:55:48 -05:00
Gerald Carter
d8b85fa12b r5560: make sure session setup message is displayed after changes to client.c
(This used to be commit 3f5e52e908)
2007-10-10 10:55:47 -05:00
Gerald Carter
038d939c2a r5545: move cli_cm_XXX() connection handling code to clidfs and out of client.c; client.c still maintains a pointer to the first connection so the change is fairly reansparent to other smbclient functions such as -L and -M
(This used to be commit d6a05ffd66)
2007-10-10 10:55:46 -05:00
Gerald Carter
584c412e0a r5542: fix a few more msdfs bugs in smbclient against both smbd and 2k dfs root
shares.
(This used to be commit 5d2624c453)
2007-10-10 10:55:46 -05:00
Gerald Carter
ca9d4c13db r5521: allow smbclient to follow multiple leveles of dfs referrals (no loop checking currently)
(This used to be commit 3c09b1f30f)
2007-10-10 10:55:44 -05:00
Gerald Carter
1b0f75ddfb r5520: fix last remaining dfs issues with smbclient.
* all the unix extension commands should work
* send the correct TRANS2_FINDFIRST format to 2k to
  get a listing from a msdfs root share (tested against
  smbd as well).
* mkdir, rmdir, etc... all seem ok.

I'm sure bugs will pop up so keep testing.

Last thing I plan on doing is to clean up the horrible
mess with connection management in smbclient and global
variables (so i can move the cli_cm_xx() routines to a
separate file).
(This used to be commit 53d6a5f9d1)
2007-10-10 10:55:44 -05:00
Gerald Carter
01b87c63c9 r5518: Add initial msdfs support to smbclient. Currently I can only
cd up and down the tree and get directory listings.

Still have to figure out how to get a directory listing on a
2k dfs root.  Also have to work out some issues with relative paths
that cross dfs mount points.

We're protected from the new code paths when connecting to
a non-dfs root share ( the flag from the tcon&X is stored
in the struct cli_state* )
(This used to be commit e57fd2c5f0)
2007-10-10 10:55:44 -05:00
Gerald Carter
37ea9da1fd r5495: * add in some code from Mike Nix <mnix@wanm.com.au> for the SMBsplopen
and SMBsplclose commands (BUG 2010)
* clarify some debug messages in smbspool (also from Mike)

my changes:

* start adding msdfs client routines
* enable smbclient to maintain multiple connections
* set the CAP_DFS flag for our internal clienht routines.

I actualy have a dfs referral working in do_cd() but that code
is too ugly to live so I'm not checking it in just yet.
Further work is to merge with vl's changes in trunk to support multiple
TIDs per cli_state *.
(This used to be commit 0449756309)
2007-10-10 10:55:43 -05:00
Andrew Bartlett
acdf1aa308 r5455: Remove bogus DEBUG messages (dump for a failure to parse NTLMSSP,
before trying the alternate format).

This only caused confusion and bug reports...

Andrew Bartlett
(This used to be commit 5cb02b569b)
2007-10-10 10:55:40 -05:00
Gerald Carter
4e8c17d985 r5432: compile fixes from Jason Mader <jason@ncac.gwu.edu> -- BUGS 2340
(This used to be commit 3fd86a1f9d)
2007-10-10 10:55:40 -05:00
Gerald Carter
26dd1bab96 r5272: BUG 2132, 2134: patch from Jason Mader <jason@ncac.gwu.edu> to remove unused variables
(This used to be commit 82c4e2f37f)
2007-10-10 10:55:36 -05:00
Jeremy Allison
c24c328a9e r4970: Fix for bug 2092, allowing fallback after kerberos and allow
gnome vfs to prevent auto-anonymous logon.
Jeremy.
(This used to be commit 843e85bcd9)
2007-10-10 10:55:10 -05:00
Jeremy Allison
6f56a5be2e r4917: Merge some of Derrell.Lipman@UnwiredUniverse.com obvious fixes.
Added text explaining units in pdbedit time fields.
Jeremy.
(This used to be commit 3d09c15d8f)
2007-10-10 10:55:07 -05:00
Volker Lendecke
c85d9e735c r4570: Replace cli->nt_pipe_fnum with an array of NT file numbers, one for each
supported pipe. Netlogon is still special, as we open that twice, one to do
the auth2, the other one with schannel.

The client interface is completely unchanged for those who only use a single
pie. cli->pipe_idx is used as the index for everything except the "real"
client rpc calls, which have been explicitly converted in my last commit. Next
step is to get winbind to just use a single smb connection for multiple pipes.

Volker
(This used to be commit dc294c52e0)
2007-10-10 10:53:47 -05:00
Jeremy Allison
b46913fb95 r4291: More *alloc fixes inspired by Albert Chin (china@thewrittenword.com).
Jeremy
(This used to be commit efc1b688cf)
2007-10-10 10:53:42 -05:00
Jeremy Allison
9e3453459c r4212: Ensure we only look at the bottom bit of large_readx.
Set the 14 word version of write if size > 0xffff as
well as 64-bit offset.
Jeremy.
(This used to be commit 94779ccb39)
2007-10-10 10:53:37 -05:00
Jeremy Allison
4730a56263 r4188: Ensure we add in the upper length in the right place !
Jeremy.
(This used to be commit 9d4e57f06c)
2007-10-10 10:53:36 -05:00
Jeremy Allison
5b713a206b r4186: Fix client & server to allow 127k READX calls.
Jeremy.
(This used to be commit 831cb21a87)
2007-10-10 10:53:36 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Jeremy Allison
e7a0aabc2e r4020: Fix for crash reported by Bård Kalbakk <baard@inett.biz>.
Don't go fishing for the authorisation data unless we
know it's there.
Jeremy.
(This used to be commit 6f6b4c61e0)
2007-10-10 10:53:28 -05:00
Jeremy Allison
b9fcb5b961 r4005: Fix for bug #2071 reported by Jason Mader <jason@ncac.gwu.edu>.
Use correct enum type for comparisons.
Jeremy.
(This used to be commit b926480d05)
2007-10-10 10:53:27 -05:00
Jeremy Allison
90a18110e9 r3931: Fix all "may be used uninitialized" and "shadow" warnings.
Jeremy.
(This used to be commit 8e979772a6)
2007-10-10 10:53:25 -05:00
Jeremy Allison
9604545ed8 r3892: Fix "might be used uninitialized" error.
Jeremy.
(This used to be commit eead77919b)
2007-10-10 10:53:24 -05:00
Volker Lendecke
24d3605d99 r3843: If a connection to a DC is requested, open connections simultaeneously to all
DCs found. The first one to reply wins.

Volker
(This used to be commit 84ac54aef2)
2007-10-10 10:53:20 -05:00
Jeremy Allison
1b31f46f22 r3714: Getfacl now seems to work on files and directories. Next do setfacl
and port to Samba4.
Jeremy.
(This used to be commit 4d52bf7c8b)
2007-10-10 10:53:16 -05:00
Jeremy Allison
f995b164b9 r3713: Implementation of get posix acls in UNIX extensions. Passes valgrind.
Need to add printout functions in client and set posix acl in server.
SteveF - take a look at this for the cifsfs client !
Once this is working and tested the next step is to write this up for
the UNIX extensions spec. documents.
Jeremy.
(This used to be commit 1bd3f13344)
2007-10-10 10:53:16 -05:00
Jeremy Allison
8ea9237d82 r3538: Fix the build with the latest Heimdal code.
Jeremy.
(This used to be commit 34275bae78)
2007-10-10 10:53:09 -05:00
Jeremy Allison
e73d23d1ba r3535: Tidy up error reporting. Memory leak with MIT krb5 1.3.5 turns
out to be in the kerberos libraries, not in Samba. Now to test
with Heimdal.
Jeremy
(This used to be commit b08e3bf6fb)
2007-10-10 10:53:08 -05:00
Volker Lendecke
5ec9dfbf94 r3525: Fix a memleak
Volker
(This used to be commit 4c4da26aa1)
2007-10-10 10:53:08 -05:00
Günther Deschner
3688bb079e r3439: Finally fix build for platforms without kerberos.
Guenther
(This used to be commit 05619cfdbf)
2007-10-10 10:53:07 -05:00
Volker Lendecke
c64df4d746 r3407: Fix the build
(This used to be commit b144ce557f)
2007-10-10 10:53:06 -05:00
Jeremy Allison
cf47845b1c r3379: More merging of kerberos keytab and salting fixes from Nalin Dahyabhai <nalin@redhat.com>
(bugid #1717).
Jeremy.
(This used to be commit 30b8807cf6)
2007-10-10 10:53:05 -05:00
Jeremy Allison
0772ddbae1 r3377: Merge in first part of modified patch from Nalin Dahyabhai <nalin@redhat.com>
for bug #1717.The rest of the code needed to call this patch has not yet been
checked in (that's my next task). This has not yet been tested - I'll do this
once the rest of the patch is integrated.
Jeremy.
(This used to be commit 7565019286)
2007-10-10 10:53:05 -05:00
Jeremy Allison
b57feea6d3 r3345: More MIT/Heimdal tests for comparing enctypes now.
Jeremy.
(This used to be commit eefb911d0c)
2007-10-10 10:53:05 -05:00
Jeremy Allison
13542c7b50 r3342: More MIT/Heimdal fixes to allow an enctype to be explicitly set in a krb5_creds
struct.
Jeremy.
(This used to be commit c9b8049012)
2007-10-10 10:53:05 -05:00
Jeremy Allison
e798a6b9fe r3294: Fix for SMB signing with 56-bit DES session keys. From Nalin Dahyabhai <nalin@redhat.com>.
Jeremy.
(This used to be commit 55d23cb253)
2007-10-10 10:53:04 -05:00
Gerald Carter
0e1de2d773 r3264: fix lmhosts lookup so that we don't say we found something when we really didn't
(This used to be commit c7036f8246)
2007-10-10 10:53:03 -05:00
Volker Lendecke
98ed2ecc1c r3143: Allow for multiple DC's to be named as #1c names in lmhosts.
Volker
(This used to be commit 2af98ec054)
2007-10-10 10:53:02 -05:00
Jeremy Allison
2d7cd5375e r3138: Fix from Sorin Manolache <sorinm@gmail.com> for memory leak.
Jeremy.
(This used to be commit b35f48ad8e)
2007-10-10 10:53:01 -05:00
Richard Sharpe
26c106e083 r2959: If we want to support writes >= 65536 with cli_write, then it had better
return a size_t, not an ssize_t, and we had better left shift the upper
part of the write count, not right shift it.
(This used to be commit 3eb33fbc64)
2007-10-10 10:52:57 -05:00
Günther Deschner
3eff1f48d5 r2942: Add client-side support of triggering ads printer publishing over msrpc
setprinter calls inside the net-tool.

This is usefull to mimic the same queries a windows-client does. At
least win2k returns WERR_IO_PENDING when printer is published via
setprinter, samba returns WERR_OK but this does not hurt.

Guenther
(This used to be commit 69b745fb98)
2007-10-10 10:52:57 -05:00
Tim Potter
8f49721fef r2899: Change some #if DEBUG_PASSWORD's to #ifdef DEBUG_PASSWORD.
Bugzilla #1903.
(This used to be commit 1327d83d90)
2007-10-10 10:52:56 -05:00
Tim Potter
b4cf9e9505 r2835: Since we always have -I. and -I$(srcdir) in CFLAGS, we can get rid of
'..' from all #include preprocessor commands.   This fixes bugzilla #1880
where OpenVMS gets confused about the '.' characters.
(This used to be commit 7f161702fa)
2007-10-10 10:52:55 -05:00
Tim Potter
66e689478a r2834: Netapps can return NT_STATUS_ACCESS_DENIED when trying to return the
security descriptor for a file.  Return an error in this case instead
of panicing trying to unpack a zero length buffer.  Found by Brett
Funderburg.
(This used to be commit 588de0d4a8)
2007-10-10 10:52:54 -05:00
Gerald Carter
13720fbb3e r2770: oops; internal_resolve_name() should stay static in 3.0
(This used to be commit 316302ca4a)
2007-10-10 10:52:52 -05:00
Gerald Carter
31441aaa13 r2768: BUG 1519: save the hostname used in the open_printer_ex() for later reuse when filling in the spolss replies (also gets rid of get_called_name()
(This used to be commit 57db8ca91f)
2007-10-10 10:52:52 -05:00
Jeremy Allison
f128aa2a55 r2665: Ensure the UNIX info level returned enough data.
Jeremy.
(This used to be commit 8a7741dddf)
2007-10-10 10:52:49 -05:00
Jeremy Allison
eb9a09954b r2651: Added 'stat' command to smbclient to exercise the UNIX_FILE_BASIC
info level. Outputs data on the file in the same format the the
stat command in Linux. Should be useful to people wanting to learn
how to parse the UNIX extension output.
Yes I will add the docs later :-).
Jeremy.
(This used to be commit b25cc59641)
2007-10-10 10:52:48 -05:00
Jeremy Allison
8875124a61 r2575: Return correct error codes on old SEARCH call (from Samba4 torture tester).
Jeremy.
(This used to be commit fc51c97ea8)
2007-10-10 10:52:47 -05:00
Günther Deschner
a71c7b4e17 r2474: (re-)fix memleak (initially found by jra).
heimdal 0.6.1rc3 had a bug causing winbindd to die, heimdal version
0.6.1 and higher have that fixed (thanks to Love from Heimdal).

SuSE has been informed about this possible pitfall, any other vendors
that ship with heimdal-0.6.1rc3 to be notified ?

Guenther
(This used to be commit 6239a5bec9)
2007-10-10 10:52:44 -05:00
Günther Deschner
83d5892eab r2472: Fixed krb5_krbhost_get_addrinfo()-parameters and make failure
of this call non-critical.

Thanks to Love for the patch and explaining the inner workings of
heimdal.

Guenther
(This used to be commit 4bd9d8240b)
2007-10-10 10:52:44 -05:00
Volker Lendecke
0b9e4a98c8 r2466: Fix memleak found by sean.chandler@verizon.net.
Thanks!

Volker
(This used to be commit 587d863ae8)
2007-10-10 10:52:44 -05:00
Stefan Metzmacher
10e4a96b53 r2388: fix client quota support
for the client we need the windows path and for server we need unix path

metze
(This used to be commit 54fd28f5e7)
2007-10-10 10:52:42 -05:00
Jeremy Allison
40a89ce884 r2373: Fix typo.
Jeremy.
(This used to be commit b1033fc77c)
2007-10-10 10:52:41 -05:00
Jeremy Allison
41b3720713 r2371: Fix for talking to OS/2 clients (max_mux ignored) by Guenter Kukkukk <guenter.kukkukk@kukkukk.com>.
Bugid #1590.
Jeremy.
(This used to be commit 330025d1a6)
2007-10-10 10:52:41 -05:00
Jeremy Allison
20e9f051e2 r2355: Now we've shipped 3.0.7, add in the DOS fix.
Jeremy.
(This used to be commit d6b26f9db7)
2007-10-10 10:52:40 -05:00
Jeremy Allison
571cc4811b r2224: Make nmbd more robust against bad netbios packets.
Jeremy.
(This used to be commit dd9b17abd6)
2007-10-10 10:52:36 -05:00
Gerald Carter
ed5fd7117e r2086: fix bug with winbindd_getpwnam() caused by Microsoft DC's not filling in the username in the user_info3
(This used to be commit 4703a71fa8)
2007-10-10 10:52:31 -05:00
Günther Deschner
77cc4121cf r2057: Although rarely used, prevent "net lookup kdc" from segfaulting when
using our own implementation of krb5_lookup_kdc with heimdal. Also,
heimdals krb5_krbhst_next() obviously does not retrieve the struct
addrinfo in the krb5_krbhst_info-struct, using
krb5_krbhst_get_addrinfo() instead.

Guenther
(This used to be commit cca660e109)
2007-10-10 10:52:29 -05:00
Günther Deschner
3eb42d3b6e r1965: add cli_setattrE (inspired by samba4-code). needed for further
migration-work. could someone possibly double-check the byte-count?

Guenther
(This used to be commit 27302905e8)
2007-10-10 10:52:25 -05:00
Jeremy Allison
2723be1239 r1661: Changed the password history format so that each history entry
consists of a 16 byte salt, followed by the 16 byte MD5 hash of
the concatination of the salt plus the NThash of the historical
password. Allows these to be exposed in LDAP without security issues.
Jeremy.
(This used to be commit 82e4036aaa)
2007-10-10 10:52:17 -05:00
Andrew Bartlett
748e7e4a92 r1612: Fix bug #1571 found by Guenter Kukkukk <guenter.kukkukk@kukkukk.com>
(Botched LANMAN2 session setup code)

Andrew Bartlett
(This used to be commit 3baa4ef6c5)
2007-10-10 10:52:16 -05:00
Andrew Bartlett
2a6ab27955 r1581: 'NULL' NTLMSSP is both a pain to get right, and compleatly and utterly
pointless.  With a well-known session key, we may as well put the
password change directly on the wire, with it's own 'crypted with old
password' as the protection.

This should fix some 'long password change' issues, against Samba in
particular.

Andrew Bartlett
(This used to be commit 554a913287)
2007-10-10 10:52:15 -05:00
Volker Lendecke
5cc398d23d r1560: Not that anybody uses this stuff (yet...), but at least get it correct :-)
When sending a mailslot datagram, get the packet length correction correct.

Volker
(This used to be commit 530e7f09ae)
2007-10-10 10:52:14 -05:00
Andrew Bartlett
9d0783bf21 r1492: Rework our random number generation system.
On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork().

For other systems, we now only re-seed after a fork, and on startup.
No need to do it per-operation.  This removes the 'need_reseed'
parameter from generate_random_buffer().

Andrew Bartlett
(This used to be commit 36741d3cf5)
2007-10-10 10:52:13 -05:00
Andrew Bartlett
8f93b50032 r1487: Remove unused parameter for the client-side signing functions.
Andrew Bartlett
(This used to be commit 6d594d5bb1)
2007-10-10 10:52:12 -05:00
Andrew Bartlett
608172ebe3 r1428: Remove *completly bogus* memset. (No doubt my bug, too...).
This memset could well have clobbered bits of the stack, because
session_key changed from

char session_key[16];

to

DATA_BLOB session_key

Andrew Bartlett
(This used to be commit 54248a405c)
2007-10-10 10:52:11 -05:00
Gerald Carter
0122d4ef5e r1407: revert change that broke the build on systems w/o krb5 files
(This used to be commit 89a11b5d7c)
2007-10-10 10:52:10 -05:00
Gerald Carter
824bc32be7 r1399: applying heimdal krb5 fixes from Guenther and fixing compile warnings in libadskerberos_keyatb.c
(This used to be commit 837f56ec8b)
2007-10-10 10:52:10 -05:00
Jeremy Allison
f5b4721d6d r1326: Modification to get_dc_list to check negative cache. From "Joe Meadows" <jameadows@webopolis.com>.
Jeremy.
(This used to be commit 4cc38b8aea)
2007-10-10 10:52:06 -05:00
Volker Lendecke
d095357d08 r1287: Attempt to fix the build for systems without kerberos headers.
Volker
(This used to be commit 43020cf459)
2007-10-10 10:52:04 -05:00
Jeremy Allison
792776782e r1240: Ensure we don't shadow Heimdal globals.
Jeremy.
(This used to be commit 464d2e9048)
2007-10-10 10:52:02 -05:00
Jeremy Allison
2b76b28932 r1236: Heimdal fixes from Guenther Deschner <gd@sernet.de>, more to come before
it compiles with Heimdal.
Jeremy.
(This used to be commit dd07278b89)
2007-10-10 10:52:01 -05:00
Jeremy Allison
7825677b86 r1222: Valgrind memory leak fixes. Still tracking down a strange one...
Can't fix the krb5 memory leaks inside that library :-(.
Jeremy.
(This used to be commit ad440213aa)
2007-10-10 10:52:00 -05:00
Jeremy Allison
59d1794527 r1194: Definition of krb5_free_unparsed_name() if we do't have it.
Jeremy.
(This used to be commit 82c219ea02)
2007-10-10 10:51:59 -05:00
Jeremy Allison
2acd084866 r1154: Change default setting for case sensitivity to "auto". If set to auto
then is the client supports it (current clients supported are Samba and
CIFSVFS - detected by the negprot strings "Samba", "POSIX 2" and a bare
"NT LM 0.12" string) then the setting of the per packet flag smb_flag
FLAG_CASELESS_PATHNAMES is taken into account per packet. This allows
the linux CIFS client to use Samba in a case sensitive manner.
Additional command in smbclient "case_sensitive", toggles the
flag in subsequent packets.
Docs to follow.
Jeremy.
(This used to be commit cf84c0fe1a)
2007-10-10 10:51:57 -05:00
Andrew Bartlett
e27895d54f r1121: Fix memory leak in the trans2 signing code.
We would start the trans2 state, which is fine, but never pull the
expected reply off the packet queue.

I'm not sure if this is still a major problem after jra's recent 'no
duplicate mids on the list' change, but I think this is correct
anyway.
(This used to be commit ee23a4237d)
2007-10-10 10:51:56 -05:00
Jeremy Allison
58686e844f r1117: Doh ! Remember to turn off signing when sending a "break to level II" oplock
message, or we mess up the signing sequence number.... Also improve sign error
reporting. Also when deferring an open that had been deferred due to an oplock
break, don't re-add the mid to the pending sign queue or we increment the sequence
number twice and mess up signing again...
I can now bounce between 2 WinXP/Win2003 boxes opening Excel spreadsheets with
signing turned on and get correct "file in use" messages.
Jeremy.
(This used to be commit 1745ce4e2c)
2007-10-10 10:51:56 -05:00
Jeremy Allison
fddef6fc20 r1115: Fix for #1427. Catch bad path errors at the right point. Ensure all
our pathname parsing is consistent.
Jeremy.
(This used to be commit 5e8237e306)
2007-10-10 10:51:56 -05:00
Jeremy Allison
8c0db1bbc4 r786: Memory leak fixes in (mostly) error code paths from
kawasa_r@itg.hitachi.co.jp. A couple of mem leak fixes in
mainline code paths though :-).
Jeremy.
(This used to be commit 4695cc95fe)
2007-10-10 10:51:38 -05:00
Herb Lewis
84cea46162 r776: I should have just cut and pasted from my build area and I would
have gotten this right :-)
(This used to be commit 548070274e)
2007-10-10 10:51:37 -05:00
Herb Lewis
bb8a4a7991 r775: merge trunk 774 to samba 3_0 - fix bad compare in for loop
(This used to be commit 3cb8f1d535)
2007-10-10 10:51:37 -05:00
Richard Sharpe
4b72f4841a r618: Bug #1333. Fix a problem pointed out by coolo where I was trying to ensure
that the errno is not trashed by a DEBUG statement, but screwed up.
(This used to be commit e642f3e7b7)
2007-10-10 10:51:31 -05:00
Richard Sharpe
80728c7045 r616: Bug #1333.
Make sure we return an error code when things go wrong.
(This used to be commit 21cdb45b54)
2007-10-10 10:51:31 -05:00
Richard Sharpe
6a110a5d2b r588: Some fixes from coolo ...
I think that the ECONNREFUSED should probably be ENOENT.
(This used to be commit faa8cc18df)
2007-10-10 10:51:30 -05:00
Richard Sharpe
a6e6cd5691 r559: Some fixes from coolo ...
(This used to be commit d80e90d7c1)
2007-10-10 10:51:29 -05:00
Gerald Carter
3bbf2f1e0a r557: another patch from Stephan Kulow <coolo@suse.de> -- check cli * before dereferencing it
(This used to be commit c385fb467f)
2007-10-10 10:51:29 -05:00
Jelmer Vernooij
22cf8924a9 r547: Add entry for NT_STATUS_DUPLICATE_NAME in the ntstatus to unix error mapping
table
(This used to be commit 31c21d520d)
2007-10-10 10:51:28 -05:00
Gerald Carter
63378d6f0e r541: fixing segfault in winbindd caused -r527 -- looks like a bug in heimdal; also initialize some pointers
(This used to be commit be74e88d9a)
2007-10-10 10:51:28 -05:00
Jeremy Allison
675ecdd5ba r539: Mem leak fixes from kawasa_r@itg.hitachi.co.jp
Jeremy.
(This used to be commit 8fe47b0bf2)
2007-10-10 10:51:28 -05:00
Jeremy Allison
33ebb4bee5 r527: More memory leak fixes in error paths from kawasa_r@itg.hitachi.co.jp.
Jeremy.
(This used to be commit b2ba4d5c1b)
2007-10-10 10:51:27 -05:00
Jeremy Allison
309bbba38b r525: More memory leak fixes from kawasa_r@itg.hitachi.co.jp in error code
paths.
Jeremy.
(This used to be commit 88a97beac4)
2007-10-10 10:51:27 -05:00
Jeremy Allison
ff343c516c r523: Fix from kawasa_r@itg.hitachi.co.jp to initialise blob structs.
Jeremy.
(This used to be commit 6d0bdccaa6)
2007-10-10 10:51:27 -05:00
Gerald Carter
04e8a07bb5 r494: patch from Stephan Kulow <coolo@kde.org> to fix a cut-n-paste error in strlen which caused Konqueror to crash
(This used to be commit 5150b62420)
2007-10-10 10:51:26 -05:00
Volker Lendecke
5c2cd8aa38 r446: Close the open NT pipes before the tdis.
Volker
(This used to be commit ef80490baf)
2007-10-10 10:51:23 -05:00
Richard Sharpe
0922c254c6 r415: Return NT_STATUS_ACCESS_DENIED not some LOCK message ...
(This used to be commit 164ff9a192)
2007-10-10 10:51:22 -05:00
Gerald Carter
042209871c r296: patch from j.lu -- don't force an upper case domain name in the ntlmssp code
(This used to be commit a2e93dda24)
2007-10-10 10:51:17 -05:00
Richard Sharpe
0374be5d93 r248: Add support for printing out the MAC address on nmblookup.
(This used to be commit bf9f02be5f)
2007-10-10 10:51:16 -05:00
Jim McDonough
3c62df4780 r221: Remainder of bug 1208. We do not remove creds from _any_ FILE ccache,
because not only does it not work on Heimdal, but also since ccaches
created within samba are memory-based, so we shouldn't touch a
FILE-based one (it was probably created via kinit or similar).
(This used to be commit 5971b0980c)
2007-10-10 10:51:14 -05:00
Jim McDonough
0859a89166 r219: Obtain new tickets if current ones are expired. Next part of fix for
bug 1208. Based on a fix from Guether Deschener.

Outstanding pieces:
- Heimdal FILE-based ccaches don't actually remove creds properly, so we
  need to code a check for this
- what if ticket expires between our check and when we use it?

Guenther has coded up fixes for these parts, but I still need
to review them, as I'm not totally comfortable with the solutions.
(This used to be commit ef008b9710)
2007-10-10 10:51:14 -05:00
Andrew Bartlett
85a307bb3e r176: Improve our fallback code for password changes - this would be better
with more correct NTLMSSP support in client and server, but it will do
for now.

Also implement LANMAN password only in the classical session setup code, but
#ifdef'ed out.  In Samba4, I'll make this run-time so we can torture it.

Lanman passwords over 14 dos characters long could be considered
'invalid' (they are truncated) - so SMBencrypt now returns 'False' if
it generates such a password.

Andrew Bartlett
(This used to be commit 565305f7bb)
2007-10-10 10:51:12 -05:00
Andrew Bartlett
b81b4711f7 r148: Ensure we do not dereference a null pointer when we return the user
session key.
(This used to be commit b09d333aed)
2007-10-10 10:51:11 -05:00
Gerald Carter
7af3777ab3 r116: volker's patch for local group and group nesting
(This used to be commit b393469d95)
2007-10-10 10:51:10 -05:00
Jeremy Allison
1db9257c95 r96: Stupid f&%'n UNIX extensions.... SETPATHINFO
normally takes as it's param entry the filename to
be acted upon.... Unless it's UNIX extensions create
hardlink, or UNIX extensions create symlink. Then it's
param -> newfile name
data -> oldfile name.
This caused me to stuff them up in 3.0.2 (and the
client commands link and symlink). Fixed them, everything
is now called oldname and newname - thus specifying which
name should already exist (hint - the old one...) and which
will be created (newname).
Jeremy.
(This used to be commit 21cc6ab7e8)
2007-10-10 10:51:08 -05:00
Andrew Bartlett
869348dfcb r84: Implement --required-membership-of=, an ntlm_auth option that restricts
all authentication to members of this particular group.

Also implement an option to allow ntlm_auth to get 'squashed' error codes,
which are safer to communicate to remote network clients.

Andrew Bartlett
(This used to be commit eb1c1b5eb0)
2007-10-10 10:51:07 -05:00
Alexander Bokovoy
c4255df992 r76: Fix smbfs problem with Tree Disconnect issued before smbfs starts its work.
We use cli_state.smb_rw_error to pass this specific case into cli_close_connection()
from smbmount as smb_rw_error can have only selected number of states and
it is ignored in cli_close_connection().

Compiled and tested by Lars Mueller from SuSE on x86, x86_64, ppc, ppc64, s390 and
s390x.
(This used to be commit 738666ce0a)
2007-10-10 10:51:07 -05:00
Andrew Bartlett
d17425ed52 r69: Global rename of 'nt_session_key' -> 'user_session_key'. The session key could
be anything, and may not be based on anything 'NT'.  This is also what microsoft
calls it.
(This used to be commit 724e8d3f33)
2007-10-10 10:51:06 -05:00
Gerald Carter
931df5850e r39: * importing .cvsignore files
* updateing WHATSNEW with vl's change
(This used to be commit a7e2730ec4)
2007-10-10 10:51:05 -05:00
Andrew Bartlett
c2ff214772 Fix most of bug #169.
For a (very) long time, we have had a bug in Samba were an NTLMv2-only
PDC would fail, because it converted the password into NTLM format for
checking.

This patch performs the direct comparison required for interactive
logons to function in this situation.  It also removes the 'auth flags', which
simply where not ever used.

Natrually, this plays with the size of structures, so rebuild, rebuild
rebuild...

Andrew Bartlett
(This used to be commit 9598593bcf)
2004-04-03 15:41:32 +00:00
Herb Lewis
70227784ba fix typo
(This used to be commit 4b737b51a5)
2004-03-31 20:24:10 +00:00
Jeremy Allison
a1994d1c96 Ensure we cope correctly with ea length of zero. Detect torture fail correctly.
Jeremy.
(This used to be commit 43db249fb8)
2004-03-30 18:38:21 +00:00
Volker Lendecke
97b200d422 Apply some const
(This used to be commit 8037750df5)
2004-03-30 08:03:32 +00:00
Jeremy Allison
099974aa15 Fix get/set of EA's in client library. Added torture test for it.
Jeremy.
(This used to be commit 0d239a9c07)
2004-03-29 22:21:47 +00:00
Andrew Bartlett
7c2b0d536b Let the comment match the function...
Andrew Bartlett
(This used to be commit 43c71b3202)
2004-03-27 10:32:59 +00:00
Andrew Bartlett
b65d7d59c2 Revert bogus part of smb signing commit - when Win2k supports singing/SPNEGO,
it does sign the first packet.

Andrew Bartlett
(This used to be commit 4b9c50db85)
2004-03-27 08:51:04 +00:00
Andrew Bartlett
63f5167a28 Add a few comments explaining KEY_EXCH
Andrew Bartlett
(This used to be commit e5422d7413)
2004-03-27 08:43:09 +00:00
Andrew Bartlett
873db3f5fd Based on the detective work of Jianliang Lu <j.lu@tiesse.com>, allow yet
another NTLMv2 combination.

We should allow the NTLMv2 response to be calculated with either the domain
as supplied, or the domain in UPPER case (as we always did in the past).

As a client, we always UPPER case it (as per the spec), but we also
make sure to UPPER case the domain, when we send it.  This should give
us maximum compatability.

Andrew Bartlett
(This used to be commit 1e91cd0cf8)
2004-03-27 07:53:47 +00:00
Andrew Bartlett
6dbd02d056 Make it clearer that this error refers to the peer, as this code is in both
the client and server.

Andrew Bartlett
(This used to be commit 414d3fdc75)
2004-03-27 07:51:31 +00:00
Andrew Bartlett
e9a7e67e01 Merge from HEAD the SMB signing patch that I developed a couple of weeks
ago.

This patch re-adds support for 'optional' SMB signing.  It also ensures that
we are much more careful about when we enable signing, particularly with
on-the-fly smb.conf reloads.

The client code will now attempt to use smb signing by default, and disable
it if the server doesn't correctly support it.

Andrew Bartlett
(This used to be commit e27b5cbe75)
2004-03-27 07:33:59 +00:00
Jeremy Allison
651d5b4683 Working (tested) client code for setting EA's by filename and fnum.
Now for parsing out the retrieved EA's.
Jeremy.
(This used to be commit 5eeeee302c)
2004-03-27 02:13:58 +00:00
Jim McDonough
9a8e30d04b Fix bugzilla # 1208
Winbind tickets expired.  We now check the expiration time, and acquire
new tickets.  We couln't rely on renewing them, because if we didn't get
a request before they expired, we wouldn't have renewed them.  Also, there
is a one-week limit in MS on renewal life, so new tickets would have been
needed after a week anyway.   Default is 10 hours, so we should only be
acquiring them that often, unless the configuration on the DC is changed (and
the minimum is 1 hour).
(This used to be commit c2436c433a)
2004-03-24 17:32:55 +00:00
Jeremy Allison
90f64838f4 Added cli_set_ea(), cli_get_ea next...
Jeremy.
(This used to be commit b0c109c403)
2004-03-24 03:48:08 +00:00
Gerald Carter
56ce613679 updating release notes & merging Derrel Lipman's libsmbclient patch from HEAD
(This used to be commit 5fbfaa687a)
2004-03-19 16:22:47 +00:00
Jeremy Allison
a0034d3586 Ensure we don't truncate strcmps to nstring anymore...
Jeremy.
(This used to be commit d7cf64b1e4)
2004-03-13 02:47:21 +00:00
Jeremy Allison
6b9dbbcd24 Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com (MORIYAMA Masayuki).
Don't use nstrings to hold workgroup and netbios names. The problem with them is that MB netbios
and workgroup names in unix charset (particularly utf8) may be up to 3x bigger than the name
when represented in dos charset (ie. cp932). So go back to using fstrings for these but
translate into nstrings (ie. 16 byte length values) for transport on the wire.
Jeremy.
(This used to be commit b4ea493599)
2004-03-13 02:16:21 +00:00
Jeremy Allison
fd2d4f87d4 First part of patch from moriyama@miraclelinux.com (MORIYAMA Masayuki) to
fix up netbios names with mb strings. Includes reformat of libsmb/nmblib.c
so it's readable.
Jeremy.
(This used to be commit 966e49a48c)
2004-03-13 00:28:53 +00:00
Herb Lewis
220d663b74 if we are truncating to the . we need to start at the beginning in case
there are multiple "."'s in the name.

This code is protected with an #ifdef TRUNCATE_NETBIOS_NAME and this
is #define'd to 1 directly above. Should we also get rid of the #ifdef?
(This used to be commit 0375dace24)
2004-03-12 21:35:15 +00:00
Jeremy Allison
e3f5b54270 Restore the contract on all convert_stringXX() interfaces. Add a "allow_bad_conv"
boolean parameter that allows broken iconv conversions to work. Gets rid of the
nasty errno checks in mangle_hash2 and check_path_syntax and allows correct
return code checking.
Jeremy.
(This used to be commit 7b96765c23)
2004-03-11 22:48:24 +00:00
Jeremy Allison
f0039da196 Added client "hardlink" commant to test doing NT rename with hard links.
Added hardlink_internals() code - UNIX extensions now use this too.
Jeremy.
(This used to be commit aad6eb2240)
2004-03-03 23:14:23 +00:00
Jeremy Allison
fba5a72249 Use a common function to parse all pathnames from the wire. This allows
much closer emulation of Win2k3 error return codes.
Jeremy.
(This used to be commit c9f31fafed)
2004-03-03 20:55:59 +00:00
Jeremy Allison
3fb52e5cc0 Can't set allocation size on directories, return correct error code on
fail if file exists and target is a directory. gentest.
Jeremy.
(This used to be commit f4a7ea6dc2)
2004-02-28 01:53:30 +00:00
Volker Lendecke
e1190848a1 That const was one too many
(This used to be commit 005d92d57e)
2004-02-26 14:34:44 +00:00
Volker Lendecke
0689a2630d Apply some const
Volker
(This used to be commit 0b29d83d33)
2004-02-26 10:55:43 +00:00
Jim McDonough
24df38dbc6 Janitor for tpot...bugzilla #1098, msleep already exists on aix
(This used to be commit 4319df7fdc)
2004-02-23 02:54:03 +00:00
Jeremy Allison
ef8f827449 Make SMB_FILE_ACCESS_INFORMATION call work correctly.
Jeremy.
(This used to be commit 0ea0ada6c6)
2004-02-20 23:19:39 +00:00
Jeremy Allison
7d7849b18a Make us bug-for-bug compatible with W2K3 - to get delete on close semantics
on an initial open the desired_access field *must* contain DELETE_ACCESS,
simply having it map from a GENERIC_ALL won't do. Fixes delete on close test.
Jeremy.
(This used to be commit 5c6f8b1053)
2004-02-20 22:45:53 +00:00
Jeremy Allison
9860bfe384 More paranoia checks.
Jeremy.
(This used to be commit adf8ee3df7)
2004-02-11 23:25:51 +00:00
Jeremy Allison
9870830104 Paranoia fixes :-).
Jeremy.
(This used to be commit 86b030197d)
2004-02-11 19:59:17 +00:00
Jeremy Allison
57dacbe948 Fix for possible crash bug from Sebastian Krahmer (SuSE).
Jeremy.
(This used to be commit e275835b51)
2004-02-10 02:21:38 +00:00
Andrew Bartlett
a69cb9c963 Remove more unused portions of the 'password cache'.
Andrew Bartlett
(This used to be commit 318e11748a)
2004-02-08 05:31:01 +00:00
Andrew Bartlett
fac5f989d3 Remove more unused functions - this time parts of the 'password cache'.
Andrew Bartlett
(This used to be commit 66569546e8)
2004-02-08 02:49:30 +00:00
Andrew Bartlett
7540296fd4 Remove unused utility function.
Andrew Bartlett
(This used to be commit 4c4aa80177)
2004-02-08 00:58:56 +00:00
Andrew Bartlett
e45c217a14 Make get_dc_list static - we only ask for a sorted list externally.
Andrew Bartlett
(This used to be commit e10e176c83)
2004-02-08 00:54:32 +00:00
Jeremy Allison
2f2e5b0191 Fix up name canonicalization (needed for krb5 keytab support later).
Remove source_env handler (no longer used in any codepath).
Jeremy.
(This used to be commit 3a3e336030)
2004-01-30 18:38:48 +00:00
Andrew Bartlett
784b05c489 This adds client-side support for the unicode/SAMR password change scheme.
As well as avoiding DOS charset issues, this scheme returns useful error
codes, that we can map back via the pam interface.

This patch also cleans up the interfaces used for password buffers, to
avoid duplication of code.

Andrew Bartlett
(This used to be commit 2a2b1f0c87)
2004-01-26 08:45:02 +00:00
Andrew Bartlett
b31ec210fc Fix the initialisation vectors for NTLM2, so that they at least make sense,
even if they don't work yet.

Andrew Bartlett
(This used to be commit 636b98dab9)
2004-01-25 01:11:10 +00:00
Jeremy Allison
bb1119acca Fix for a signing bug when the mid wraps.
Found by Fran Fabrizio <fran@cis.uab.edu>.
Add to the *start* of the list not the end of the list.
This ensures that the *last* send sequence with this mid
is returned by preference.
This can happen if the mid wraps and one of the early
mid numbers didn't get a reply and is still lurking on
the list.
Jeremy.
(This used to be commit 25d739978f)
2004-01-17 00:30:35 +00:00
Gerald Carter
b20f1a95a9 * BUG 446
- setup_logging() in smbclient to be interactive (remove the timestamps)
  - Fix bad return value in pull_ucs2( needs more testing to make sure this
    didn't break something else) that caused clistr_pull() to always read
    the same string from the buffer (pull_usc2() could return -1 if the original
    source length was given as -1)
  - increment some debugging messages to avoid printing them out so often
(This used to be commit 79fe75dcdf)
2004-01-15 19:03:18 +00:00
Gerald Carter
b085f0f08e * allow dns lookups to be disabled for DOMAIN#1c (and #1b)
names
* fix some a mispelled variable name
(This used to be commit bca702c976)
2004-01-13 19:42:53 +00:00
Gerald Carter
500c28974d fix some warnings from the Sun compiler
(This used to be commit ebabf72a78)
2004-01-09 14:54:33 +00:00
Andrew Bartlett
f1f24c7c6f Romve debugging assertions (oops...)
Andrew Bartlett
(This used to be commit 7e75a6d681)
2004-01-09 02:47:35 +00:00
Andrew Bartlett
9e1c7dd516 Add a new type of name lookup 'ads'. This seperates this from normal
hostname lookups, and ensures that we don't lookup 'short' (ie NetBIOS)
domain names in DNS.

Andrew Bartlett
(This used to be commit 35f6347a73)
2004-01-09 02:38:58 +00:00
Andrew Bartlett
7d068355aa This merges in my 'always use ADS' patch. Tested on a mix of NT and ADS
domains, this patch ensures that we always use the ADS backend when
security=ADS, and the remote server is capable.

The routines used for this behaviour have been upgraded to modern Samba
codeing standards.

This is a change in behaviour for mixed mode domains, and if the trusted
domain cannot be reached with our current krb5.conf file, we will show
that domain as disconnected.

This is in line with existing behaviour for native mode domains, and for
our primary domain.

As a consequence of testing this patch, I found that our kerberos error
handling was well below par - we would often throw away useful error
values.  These changes move more routines to ADS_STATUS to return
kerberos errors.

Also found when valgrinding the setup, fix a few memory leaks.

While sniffing the resultant connections, I noticed we would query our
list of trusted domains twice - so I have reworked some of the code to
avoid that.

Andrew Bartlett
(This used to be commit 7c34de8096)
2004-01-08 08:19:18 +00:00
Andrew Bartlett
e0ec9d2d56 Make it clearer that the domain here is the domain of the user for
authentication.

Andrew Bartlett
(This used to be commit 7e6cc8f003)
2004-01-08 02:57:42 +00:00
Andrew Bartlett
cfa4469c1e Fix more cases to ensure that as a server, we don't complain to the client
about our server-side lack of session key.

Andrew Bartlett
(This used to be commit ba33f1e0d5)
2004-01-05 21:24:27 +00:00
Jeremy Allison
2ed5a1a340 Ensure we set "always sign" flag if set. We don't currently do anything with
this but we should log the fact it was negotiated.
Jeremy.
(This used to be commit 84d34e32be)
2004-01-05 19:21:06 +00:00
Andrew Bartlett
ed55d03c8a Don't free the encrypted_session_key early - that causes the subsequent
test for a valid length to fail...

This should fix 'security=server' and hosts-equiv failures picked up by
the build farm.

Andrew Bartlett
(This used to be commit 39311495de)
2004-01-05 12:36:21 +00:00
Andrew Bartlett
425699fce7 Correctly handle per-pipe NTLMSSP inside a NULL session. Previously we
would attempt to supply a password to the 'inside' NTLMSSP, which the
remote side naturally rejected.

Andrew Bartlett
(This used to be commit da408e0d5a)
2004-01-05 04:12:40 +00:00
Andrew Bartlett
a7f8c26d24 Change our Domain controller lookup routines to more carefully seperate
DNS names (realms) from NetBIOS domain names.

Until now, we would experience delays as we broadcast lookups for DNS names
onto the local network segments.

Now if DNS comes back negative, we fall straight back to looking up the
short name.

Andrew Bartlett
(This used to be commit 32397c8b01)
2004-01-05 04:10:28 +00:00
Andrew Bartlett
d4954eff57 Make it clear that we cannot sign if we don't have a session key.
(This used to be commit a2f6dec05b)
2004-01-05 00:11:35 +00:00
Andrew Bartlett
e8984d6b9a Automaticly initialise the signing engine, if we have a session key.
(This used to be commit cb063c1b69)
2004-01-05 00:11:02 +00:00
Andrew Bartlett
cc02d8690c Even if the 'device type' is always an ascii string, use push_string to get
it out onto the wire.  Avoids valgrind warnings because the fstrcpy() causes
part of the wire buffer to be 'marked'.

Andrew Bartlett
(This used to be commit 53d802c72a)
2004-01-04 11:05:30 +00:00
Andrew Bartlett
4cc701196e There is not a particularly good excuse for complaining to the *client* that
it sent 'INVALID_PARAMETER', when it was us as the server that could not
come up with a session key.  Instead, allow normal authentication to take
place, but do not setup a session key.

Andrew Bartlett
(This used to be commit e5abd93d79)
2004-01-03 01:12:56 +00:00
Andrew Bartlett
5eee23cc64 auth/auth_util.c:
- Fill in the 'backup' idea of a domain, if the DC didn't supply one.  This
   doesn't seem to occour in reality, hence why we missed the typo.

lib/charcnv.c:
lib/smbldap.c:
libads/ldap.c:
libsmb/libsmbclient.c:
printing/nt_printing.c:
 - all the callers to pull_utf8_allocate() pass a char ** as the first
   parammeter, so don't make them all cast it to a void **

nsswitch/winbind_util.c:
 - Allow for a more 'correct' view of when usernames should be qualified
   in winbindd.  If we are a PDC, or have 'winbind trusted domains only',
   then for the authentication returns stip the domain portion.
 - Fix valgrind warning about use of free()ed name when looking up our
   local domain.  lp_workgroup() is maniplated inside a procedure that
   uses it's former value.  Instead, use the fact that our local domain is
   always the first in the list.

Andrew Bartlett
(This used to be commit 494781f628)
2003-12-31 00:31:43 +00:00
Andrew Bartlett
adc07646a3 Move our basic password checking code from inside the authentication
subsystem into a seperate file - ntlm_check.c.

This allows us to call these routines from ntlm_auth.  The purpose of this
exercise is to allow ntlm_auth (when operating as an NTLMSSP server) to
avoid talking to winbind.  This should allow for easier debugging.

ntlm_auth itself has been reorgainised, so as to share more code between
the SPNEGO-wrapped and 'raw' NTLMSSP modes.  A new 'client' NTLMSSP mode
has been added, for use with a Cyrus-SASL module I am writing (based on vl's
work)

Andrew Bartlett
(This used to be commit 48315e8fd2)
2003-12-30 07:33:58 +00:00