1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00

2184 Commits

Author SHA1 Message Date
Derrell Lipman
914cd3e483 Eliminate global variable in_client and a plethora of extern declarations.
Derrell
(This used to be commit b7f34e7ef2907b498a0645ce68f2773ed7d60cdc)
2008-03-06 10:41:42 -05:00
Volker Lendecke
5eb347193f Fix a "nested extern declaration" warning
(This used to be commit e473e6d50c56f52ef5e4853e4ca3b3548af06f51)
2008-03-06 15:50:46 +01:00
Derrell Lipman
5b80b9340f Check for NULL pointers before dereferencing them.
(This used to be commit 6f65390cec218a6aac4370ee381f30439617dcec)
2008-03-06 09:00:37 -05:00
Volker Lendecke
a015227490 Convert cli_read to use cli_pull
(This used to be commit d69b20111a849152a7d9108763207c813bf9068b)
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 76f9b360ee1d973630d82d401eeddce858189301)
2008-03-06 13:28:23 +01:00
Volker Lendecke
1ea0a5d0cd Add infrastructure to support async SMB requests
(This used to be commit e2153301351559f30f2714345f4c1ca6c5f1a45f)
2008-03-06 13:28:23 +01:00
Volker Lendecke
e82c9d1c31 Check the right pointer for non-NULL
Fix Coverity ID 558, 559
(This used to be commit 8e33d19d93ef57a9438aad085aaf04b7c09fe09b)
2008-03-06 11:33:26 +01:00
Derrell Lipman
1363ee9d65 Continued revamping of libsmbclient.
- James suggested using gcc's "deprecated" attribute to mark the context
  structure fields to generate warnings.  This creates a scenario with the
  best of all worlds.  I'm able to move to an organization that more easily
  allows future enhancements, while avoiding any mandatory changes by
  applications.  Thanks, James!

- Updated WHATSNEW.txt so that it accurately reflects the current state of
  affairs.

Derrell
(This used to be commit a67f96fbe9683b46c2149f7cb439d13f7f0e6ecd)
2008-03-03 18:13:33 -05:00
Derrell Lipman
fc65c6698e Return NULL, not 0, from a function which returns a pointer.
(This used to be commit 23cb9c49e3724cecaa66655ef64c3111bf14c552)
2008-03-01 21:19:52 -05:00
Derrell Lipman
223940d9a8 Additional revamped libsmbclient documentation
- Ensured that all public functions have documentation in libsmbclient.h
- Reformatted for "proper" indentation
- Re-added temporarily-disabled alternate authentication function capability

Derrell
(This used to be commit 64b7150d92849a1e1e2416b9dcc12fae8d6bea99)
2008-03-01 20:47:22 -05:00
Derrell Lipman
4ba42cbe0f Modified revamp of the libsmbclient interface.
Given the tacit (if that) approval by some people, and clear disapproval by
others for my proposed clean-up and reorganization of libsmbclient, I've come
up with a slightly different approach.  This commit changes back to the
original libsmbclient.h SMBCCTX structure which will maintain ABI
compatibility.  I retain, here, the setter and getter functions which all new
code should use.  Older programs already compiled should continue to work
fine.  Older programs being recompiled will encounter compile-time errors
(intentionally!) so that the code can be corrected to use the setter/getter
interfaces.

Although this doesn't clean up the interface in the way I had wanted, the code
reorganization and requirement for new programs to use the setters and getters
allows future progress to be made on libsmbclient without further muddying up
the interface, while retaining the ABI compatibility that was the big issue
causing disapproval.  I hope that this compromise is adequate.

Derrell
(This used to be commit 56429a3d60b2a48963342f6340b3c01469a892c6)
2008-03-01 20:47:22 -05:00
Derrell Lipman
257b7b0929 Initial revamp of the libsmbclient interface.
The libsmbclient interface has suffered from difficulty of improvement and
feature enrichment without causing ABI breakage.  Although there were a number
of issues, the primary ones were:

(a) the user of the library would manually manipulate the context structure
    members, meaning that nothing in the context structure could change other
    than adding stuff at the end;

(b) there were three methods of setting options: setting bits in a flags field
    within the context structure, setting explicit options variables within an
    options structure in the context structure, and by calling the
    smbc_option_set() function;

(c) the authentication callback did not traditionally provide enough
    information to the callee which required adding an option for a callback
    with a different signature, and now there are requests for even more
    information at the callback, requiring yet a third signature and option to
    set it (if we implement that feature).

This commit provides a reorganization of the code which fixes (a) and (b).
The context structure is now entirely opaque, and there are setter and getter
functions for manipulating it.  This makes maintaining ABI consistency much,
much easier.

Additionally, the options setting/getting has been unified into a single
mechanism using smbc_option_set() and smbc_option_get().

Yet to be completed is a refactoring of the authentication callback (c).

The test programs in examples/libsmbclient have been modified (if necessary;
some applications require no changes at all) for the new API and a few have
been minimally tested.

Derrell
(This used to be commit d4b4bae8ded824d06ad5ab0e219f71187ee5c771)
2008-03-01 20:47:22 -05:00
Volker Lendecke
45a877f392 Revert "Add infrastructure to support async SMB requests"
This reverts commit f5356825698a02df2d400b51dd95d1f857c83e81.
(This used to be commit 5f53a62be8a21b8d92ac44b18d202882500356e8)
2008-03-01 09:38:14 +01:00
Volker Lendecke
a34d158880 Revert "Add async cli_pull support"
This reverts commit 844a163458c7585e4306a21ffdae5d08e03d6e4d.
(This used to be commit 5ab1cfda500de07ff3c712442ab2fc74eecc8886)
2008-03-01 09:38:14 +01:00
Volker Lendecke
342859edfc Revert "Convert cli_read to use cli_pull"
This reverts commit 719527f55e88f0c5fdceda5c807475aba299c79f.
(This used to be commit ac301fada257e2d3b50148109a3d44fa1421b0b4)
2008-03-01 09:38:14 +01:00
Volker Lendecke
5e0d86c407 Restore 3.0 behaviour with empty /etc/hosts
Jeremy, in 3.0 we allowed get_mydnsdomname and get_mydnsfullname to fail
without filling in anything useful. Worked fine. Without this patch and a empty
/etc/hosts and no DNS configured, session setup would return
NT_STATUS_BAD_NETWORK_NAME. This is confusing at best, BAD_NETWORK_NAME afaik
is only ever returned from tcon normally.

This restores the 3.0 behaviour.

Comments?

Volker
(This used to be commit 2bd3b7d474768f842921945d283eac10da2a1684)
2008-02-29 22:39:45 +01:00
Volker Lendecke
45615d6283 Check the right variable for being NULL
(This used to be commit f2c67803792f1fd3929e922c1f626f8247e08992)
2008-02-29 22:39:45 +01:00
Günther Deschner
bddceee09a Fix memleak in netsamlogon_cache_get().
Guenther
(This used to be commit b736c77dc6c36dcdb601903fadf0ef7f163052a3)
2008-02-28 23:15:11 +01:00
Volker Lendecke
95222d115a Convert cli_read to use cli_pull
(This used to be commit 719527f55e88f0c5fdceda5c807475aba299c79f)
2008-02-28 15:27:55 +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 844a163458c7585e4306a21ffdae5d08e03d6e4d)
2008-02-28 15:27:55 +01:00
Volker Lendecke
1d41b5bd2a Add infrastructure to support async SMB requests
(This used to be commit f5356825698a02df2d400b51dd95d1f857c83e81)
2008-02-28 15:27:55 +01:00
Jeremy Allison
6e2e0e2ce7 Fix the build - don't use SMB_TRANS_ENC_GSS without
KRB5.
Jeremy.
(This used to be commit d16c295642c3df49be02440427ded0cd9b4179f5)
2008-02-28 06:01:09 -08:00
Volker Lendecke
be4a76a861 Add cli_setup_packet_buf
This is == cli_setup_packet but takes an explicit buffer argument
(This used to be commit f64b46dc278899c3449cfd3dbb614aadcf5614d3)
2008-02-28 14:20:17 +01:00
Volker Lendecke
57a9fba097 Make cli_struct a talloc parent
(This used to be commit e69244a5c8c7c6b7c1897adc4b4b1cfdfc7a7999)
2008-02-28 14:20:17 +01:00
Günther Deschner
11b81cb8e4 Add WERR_TIME_SKEW to werror mapping tables.
Guenther
(This used to be commit 74767be627d48eb1a8deea3784847159b536a0fb)
2008-02-28 14:10:53 +01:00
Volker Lendecke
b9f7dd2909 Add explicit buf arg to cli_check_sign_mac
(This used to be commit ffc1c8cc03e6bad40ed2be91392074b4f038a1bf)
2008-02-28 13:12:34 +01:00
Volker Lendecke
4b5169f590 Add explicit buf arg to cli_encrypt_message and cli_calculate_sign_mac
(This used to be commit db6ae9ed2326e6cd68475375d049084cf1d5a98c)
2008-02-28 13:12:34 +01:00
Günther Deschner
0d8985f2da Let dsgetdcname() return a struct netr_DsRGetDCNameInfo.
Guenther
(This used to be commit b1a4b21f8c35dc23e5c986ebe44d3806055eb39b)
2008-02-28 12:40:55 +01:00
Jeremy Allison
1d940490e8 Fix from Guenter Kukkukk <linux@kukkukk.com> to fix listing against
OS/2 servers. OS/2 returns eclass == ERRDOS && ecode == ERRnofiles
for a zero entry directory listing.
Jeremy.
(This used to be commit b34da627053581a9584367e177566d4a2cef7e82)
2008-02-28 02:22:13 -08:00
Günther Deschner
7269a504fd Add my copyright.
Guenther
(This used to be commit d078a8757182d84dfd3307a2e1b751cf173aaa97)
2008-02-27 19:38:48 +01:00
Günther Deschner
2d01ec2c39 Use new LSA_POLICY defines in lsa rpc server code and other places.
Guenther
(This used to be commit 58cca9faf9db506bd2f6eab4a99ef85153797ab2)
2008-02-27 15:57:09 +01:00
Derrell Lipman
fa341d5262 add smbc_ftruncate() to emulate POSIX ftruncate()
(This used to be commit 6f5051b9c1405ab1dc3e697419ceedb3acac46d8)
2008-02-26 21:44:51 -05:00
Derrell Lipman
c58e7427bf add a function to truncate a file to a specified size
(This used to be commit 7e5752812d6d9e3bcf9a545cbdcf3afe2175dbc4)
2008-02-26 21:42:26 -05:00
Volker Lendecke
3176392878 Fix some warnings
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
(This used to be commit ad37b7b0aee265a3e4d8b7552610f4b9a105434d)
2008-02-25 16:09:26 +01:00
Volker Lendecke
a5e43bc817 Fix typo
(This used to be commit 621db68f32f7007de8b2c4d7cf604a5778725615)
2008-02-23 21:40:39 +01:00
Volker Lendecke
6548493de7 Fix a C++ warning
(This used to be commit ac027a9b2e84d319f961ac0e84654a0e48920138)
2008-02-23 11:04:13 +01:00
Tim Potter
441de75e58 Fix memory leaks on error path
(This used to be commit 47dd0700b4320bf5ac9a80e71ae82d82d4554e6a)
2008-02-20 18:27:40 -08:00
Günther Deschner
5b8ebcf397 Remove unused creds_client_check and creds_client_step.
Guenther
(This used to be commit 1dcb32424d16cff968a8713352c93c48dec58674)
2008-02-17 03:08:42 +01:00
Günther Deschner
c1793b2b31 Use new IDL based PAC structures in clikrb5.c
Guenther
(This used to be commit 3b0135d57e1e70175a5eec49b603a2e5f700c770)
2008-02-17 02:11:59 +01:00
Günther Deschner
8027b7c25d Use netr_SamInfo3 in samlogon cache and use ndr functions for storing the blob.
Guenther
(This used to be commit bf860ae1ac6765b1eb6e2ca9b667b19b4e661fda)
2008-02-17 02:11:59 +01:00
Günther Deschner
dd65a34935 Use rpccli_netr_ServerPasswordSet in "just_change_the_password()".
Guenther
(This used to be commit 33f91c894488687a42500e751eb9016d99d9129c)
2008-02-16 16:04:01 +01:00
Günther Deschner
b6285fc052 Remove unused creds_server_check and creds_server_step.
Guenther
(This used to be commit 2fb73a3545634982d17d3823cb629f06c5779fc0)
2008-02-16 15:14:04 +01:00
Günther Deschner
3f24ef1848 Replace DOM_CHAL with "struct netr_Credential" where we can right now.
This allows to remove some more old netlogon client calls.

Guenther
(This used to be commit c0b1a876583230a5130f5df1965d6c742961bcdc)
2008-02-15 23:57:54 +01:00
Günther Deschner
f8bd3e82e5 Add netlogon_creds_server_check and netlogon_creds_server_step.
Guenther
(This used to be commit ea0bf74918e7b009439452ea14ed68b0ce620787)
2008-02-15 20:58:34 +01:00
Günther Deschner
401c0a6551 Add netlogon_creds_client_check and netlogon_creds_client_step.
Guenther
(This used to be commit 41d33a2507e3fae7837bb8e42b1ac30cc31c31dc)
2008-02-15 14:04:55 +01:00
Jeremy Allison
39e0dbcf07 Allow the mechOID to be written separately.
Jeremy.
(This used to be commit e3e08c6e7d270e1be7a9d3042b1f36f5a291f90a)
2008-02-14 11:29:54 -08:00
Günther Deschner
0ba3d44f73 Use rpccli_lsa_EnumTrustDom all over the place.
Guenther
(This used to be commit a25e7ffbca9c2c97dd36b0596e7cb38a72aaf9d9)
2008-02-13 00:29:37 +01:00
Volker Lendecke
b4dd60efa9 Add a missing return
If I'm not completely blind, we should return here. Not doing it here seems not
to be a major flaw, as far as I can see we're only missing the error code. This
might account for some of the very unhelpful NT_STATUS_UNSUCCESSFUL error
messages people see during joins.

All with stake in Samba client, please check!
(This used to be commit eadd15c9363a57c214ede3c489057646baca48f8)
2008-02-11 18:37:58 +01:00
Jeremy Allison
20d6ebe813 We don't need the extra null termination - we've
already got this in the cli_receive_trans calls.
Jeremy.
(This used to be commit 99424bba7bb45b05d970bab4a5e93f2cb636fcbb)
2008-02-08 22:02:00 -08:00
Jeremy Allison
0b583e4329 Make clilist work again with OS/2 (kukks help!).
Jeremy.
(This used to be commit 2e27309401faa554620886b0e369db9d9c08e4fd)
2008-02-08 19:02:49 -08:00