1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

26109 Commits

Author SHA1 Message Date
Derrell Lipman
2f0a61564a 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
(cherry picked from commit a67f96fbe9683b46c2149f7cb439d13f7f0e6ecd)
(This used to be commit 046653403fadfa2d42decce7048eca6321b321c6)
2008-03-04 09:02:42 +01:00
Derrell Lipman
8cd0cf153e Remove use of deprecated function
(cherry picked from commit 93580bce833453ba512ee436d6dfdbdcd2c53777)
(This used to be commit 0621dfe10f1fd3d8ce04a039d2d44d6c67407746)
2008-03-04 09:02:00 +01:00
Derrell Lipman
2edf9c595e fixed missing white space
(cherry picked from commit 71e86f13b0ace3841c6712084728c79db74ff803)
(This used to be commit 8bf707c13794539029be2229f0c587b713b4fd20)
2008-03-04 09:01:31 +01:00
Derrell Lipman
2492e96a8e Update WHATSNEW for libsmbclient changes
(cherry picked from commit f07407a32e178a47c8f9b3e3703aa5a20f0a4f06)
(This used to be commit 938c6aef24c696be9bd247e43c7c5ec1f792dbd6)
2008-03-04 09:01:09 +01:00
Derrell Lipman
ddf19f91e5 Return NULL, not 0, from a function which returns a pointer.
(cherry picked from commit 23cb9c49e3724cecaa66655ef64c3111bf14c552)
(This used to be commit 9b4bd6473ed3f93c1bbfae3f82d0a100e832df48)
2008-03-04 09:00:26 +01:00
Derrell Lipman
298fb51286 change variable name from f to fn for function pointers
(cherry picked from commit 1fd65359f6cd07539cfe43146ac367a48708a678)
(This used to be commit b7f10bd31dec8047ea996c4738a6db5535c9261a)
2008-03-04 09:00:05 +01:00
Derrell Lipman
99eab28ce1 Comment was in wrong place
(cherry picked from commit dec70fa3c0424c148016cc667a3c159e16d8a944)
(This used to be commit eb4d6dda1091199af7e62fb584525deb382978e2)
2008-03-04 08:59:31 +01:00
Derrell Lipman
4a1f55ba0d Mark smbc_option_{get,set} as deprecated
(cherry picked from commit a8b4b773d4647f28e7b92c5968469721d34eb550)
(This used to be commit 7b05e264d58c65af37af457947548611fc77edce)
2008-03-04 08:59:00 +01:00
Derrell Lipman
9a96722833 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
(cherry picked from commit 64b7150d92849a1e1e2416b9dcc12fae8d6bea99)
(This used to be commit dca8a612e94095e38df50f0fe567c75ceb8124fe)
2008-03-04 08:58:38 +01:00
Derrell Lipman
48894994d0 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
(cherry picked from commit 56429a3d60b2a48963342f6340b3c01469a892c6)
(This used to be commit 7bc53f57dcb1c3bb80cb20796ebfc743c22a76e3)
2008-03-04 08:58:14 +01:00
Derrell Lipman
c2beacfb3f 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
(cherry picked from commit d4b4bae8ded824d06ad5ab0e219f71187ee5c771)
(This used to be commit 59292c0da8880afd7bac82f6a5bba009f3827ea0)
2008-03-04 08:57:53 +01:00
Volker Lendecke
5491030872 Zero out the out policy handler in lsa_Close
... after a REALLY long session staring at sniffs we can now join XP to
v3-2-test again...

Apparently not doing this makes XP keep an internal handle to LSA open which
confuses the hell out of it.

Karolin, this needs to be in v3-2-stable :-)

Volker
(cherry picked from commit 2c42fc21d8bede226e411623aecd69038477373b)
(This used to be commit a94313e06a030e1a1afff18c797e700eb6b25248)
2008-03-04 08:55:25 +01:00
Volker Lendecke
f247b78eb9 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 4170259e5f83c281966a80916e4ece6937e08988)
2008-03-03 11:40:12 +01:00
Volker Lendecke
2e7eb4d023 Revert "Add basic infrastructure for general async requests"
This reverts commit ae254cb61f4b9331755848c47ebc34e90dd80390.
(cherry picked from commit 030bef7f22f7a73466204b7860f397dbca9f2ab0)
(This used to be commit 575b829b390f7f07138305adc2988918eda95ce1)
2008-03-03 11:27:51 +01:00
Volker Lendecke
a1facdd7cc Revert "Add infrastructure to support async SMB requests"
This reverts commit f5356825698a02df2d400b51dd95d1f857c83e81.
(cherry picked from commit 5f53a62be8a21b8d92ac44b18d202882500356e8)
(This used to be commit 8beead9c936038365f28467e527b2c066e3a5440)
2008-03-03 11:27:16 +01:00
Volker Lendecke
54541623e4 Revert "Add async cli_pull support"
This reverts commit 844a163458c7585e4306a21ffdae5d08e03d6e4d.
(cherry picked from commit 5ab1cfda500de07ff3c712442ab2fc74eecc8886)
(This used to be commit 7821066d4ff4a8503a596ab342a2a84ed9a9f8b9)
2008-03-03 11:26:43 +01:00
Volker Lendecke
80a3e1549c Revert "Convert cli_read to use cli_pull"
This reverts commit 719527f55e88f0c5fdceda5c807475aba299c79f.
(cherry picked from commit ac301fada257e2d3b50148109a3d44fa1421b0b4)
(This used to be commit 1bfc4404e7f7314111f979bd09321e39be76bf15)
2008-03-03 11:26:00 +01:00
Günther Deschner
bc5d7d9387 Make sure we are still able to join Windows 2008.
Guenther
(cherry picked from commit aa9c0f587718f4d647e87b9662acbedba042b9cb)
(This used to be commit 851b53895807835fc9e6a4a1b3a2b4739ca7c63f)
2008-03-03 10:58:57 +01:00
Karolin Seeger
91609a671e Update WHATSNEW.
Parameter 'hidden' has been renamed to 'administrative share'.

Karolin
(This used to be commit f2712698241dc7a0c75378fb8fd747b923d3248f)
2008-02-29 17:51:00 +01:00
Karolin Seeger
40ad573190 Fix release script.
(This used to be commit 400609bce5cd1ce7e3330b9f00bb1f08de9d3a12)
2008-02-29 17:03:00 +01:00
Karolin Seeger
6d1029607d Prepare for release 3.2.0pre2
Karolin
(This used to be commit efdf6faba161cae9d4a0a2c693ea0b261dc73ce2)
2008-02-29 17:02:41 +01:00
Jeremy Allison
1c21e41cd9 Patch to fix the "Invalid read of size 4" errors. Bug #3617.
Jeremy.
(cherry picked from commit fa12667ec284fdda45b79cbf6bf548ab0faae34f)
(This used to be commit 5f00c79ac22ecfa846eebd910e7c25d326595f8e)
2008-02-29 16:09:59 +01:00
Andreas Schneider
f22531b65d Rename the 'hidden' variable to 'administrative share'.
(cherry picked from commit eff3d3bad5a8860b99375cc0be9dc24f3679e416)
(This used to be commit 39f712048d7408ba91301b59752f2e87e894a3f0)
2008-02-29 16:07:35 +01:00
Michael Adam
fbc514eb31 Fix linking of smbget when there is no shared library support.
smbget needs libwbclient.

Michael
(cherry picked from commit 78bc496ecf72b5c2474911302e81a90c488e3070)
(This used to be commit 901936edd33ae710c6f23bea528132ee5e10e097)
2008-02-29 16:07:17 +01:00
Günther Deschner
f95712432b Fill in WHATSNEW.txt.
Guenther
(cherry picked from commit 55e85ccd3ec59afc05b955f1458d9fc655cee752)
(This used to be commit f85ddd10d644a7212922e1c7e8e2e2793e9703c8)
2008-02-29 16:06:14 +01:00
Karolin Seeger
c4fbe28462 Merge commit 'origin/v3-2-test' into v3-2-stable
Conflicts:

	WHATSNEW.txt
(This used to be commit a390bcf9403df4cf4d5eef42b35ebccbe253882e)
2008-02-29 10:44:38 +01:00
Volker Lendecke
695b6662ab Attempt to fix the build
(This used to be commit 364d87a5e41045808ebd28f46c5c0c93bd13a7da)
2008-02-29 10:17:35 +01:00
Stefan Metzmacher
85b7f90c47 configure: only build vfs_syncops if dirfd() is available
This hopefully fixes the build on HP-UX.

metze
(This used to be commit 5fb7533e37b6c682e019b1c3515dc6befc8bda09)
2008-02-29 09:58:37 +01:00
Stefan Metzmacher
8657066f3a configure: Remove lib/repdir.c and related stuff
It was only used in configure, but lib/replace already
has a much better version of it.

metze
(This used to be commit c9b60b75b4763c37cfa63741b4f055e4ea488e92)
2008-02-29 09:48:24 +01:00
Volker Lendecke
18206a4cb5 Add vfs_aio_fork
This is used for two purposes:

First, I'm using it to test the async I/O code. In the forked process it is
pretty easy to delay a reply for a random amount of time. See the
BUILD_FARM_HACKS snippet.

Second, there are systems around that claim to have Posix AIO but which is
broken. This might be some help for those systems.

Also add tests how to pass file descriptors
(This used to be commit b0e52cecf2009d4c7f29412dadf17910e54e4327)
2008-02-29 09:47:53 +01:00
Michael Adam
bab27a2ff2 Fix creation of replacetort.
Forgot to git add Makefile.in before doing git commit --amend
in previous commit...

Michael
(This used to be commit 7cf645cdae8ce17705036951538991b0a9dbefaf)
2008-02-29 09:40:09 +01:00
Michael Adam
71f74cfc67 libreplace: add snprintf.c to test code for getifaddrs - needed on some systems.
Michael
(cherry picked from commit 0aff54a12e20d5e91fcdec7aaec103fb9a371a23)
(This used to be commit 77b7d7c0417e498340d1c9364fbbb8671c175477)
2008-02-29 09:32:11 +01:00
Michael Adam
a73f4bc27f libreplace: ifdef out ip6 code if unsupported.
Michael
(cherry picked from commit 54cc0df4dbf6d63a9b94e1ac6af4ec7f7803bc30)
(This used to be commit 1ff0b616a9cb029040031f797b52112d4973e1eb)
2008-02-29 09:32:05 +01:00
Michael Adam
5827e84d88 libreplace: fix rep_freeifaddrs to not segfault on NULL input.
Michael
(cherry picked from commit 0cbb87453beb52c6b0bc3a48791f49678f4030c5)
(This used to be commit 34d906ef44d1a5c3452097a9cac438d721fe35c1)
2008-02-29 09:31:57 +01:00
Michael Adam
b6578dc7fe libreplace: fix silly crashbug in getifaddrs_test().
Michael
(cherry picked from commit 523626908d25f974fd1ae6d7306b1d4bc8414162)
(This used to be commit 0906120a6e4fe0eb66f3c3fd99c625b30672cb2b)
2008-02-29 09:31:50 +01:00
Michael Adam
3be85e76a8 libreplace: add missing newline in output of getifaddrs test.
Michael
(cherry picked from commit f8243cfc47c7414bab7f249d0e5d1c85e8ca7d64)
(This used to be commit 3c1843f931b896dd3bb142346ecb44c0fb9202d6)
2008-02-29 09:31:39 +01:00
Michael Adam
539c4df84b libreplace: add missing semicolon to getifaddrs.
Michael
(cherry picked from commit 29818a07de826fd687003ff25865d77939ecaa9a)
(This used to be commit 1d906d346ed90b87895772a64c7613324ef8b682)
2008-02-29 09:31:29 +01:00
Michael Adam
39cae1d5b7 libreplace: try and fix rep_getifaddrs() for Tru64.
Don't fail when there is no address assigned to the interface.
Put NULL into the ifaddrs structure instead.

Michael
(cherry picked from commit ee170c85e0e76411bd752de5fe51db6940dab929)
(This used to be commit 650cc1da4b4404880389c583dbb07ce86df48576)
2008-02-29 09:31:19 +01:00
Michael Adam
ca237a3ad3 libreplace: use the new getifaddrs test also for autoconf.
Michael
(cherry picked from commit a2a506ff0eae2a64ebe2ddbb81a6c2a5fa7fe3da)
(This used to be commit c5932414fdf0b568cbfe6cdefaec41c8afc8ca6b)
2008-02-29 09:31:02 +01:00
Michael Adam
d24f3b8a93 libreplace: add extended getifaddrs test that prints out the interfaces.
Michael

cherry-picked from libreplace-part of 9d2bab09aac22c00fe23f1e1265a2dbd0901e9ce
and adapted replacetort creation
(This used to be commit 52d79ad4872a20cf55f31aba97629c2561bfc16c)
2008-02-29 09:30:40 +01:00
Günther Deschner
808348a8ca Trying to fix libnetapi examples Makefile.in.
Guenther
(This used to be commit 405ef74d7e9ef614ea39b7cfd1d57307d9490545)
2008-02-29 02:49:27 +01:00
Günther Deschner
53d55794df libnetjoin: add fallback to level 24 samr setinfo so that libnet can join NT4.
Guenther
(This used to be commit bc2d3d51449831146a9faf6e809e7a91d174659c)
2008-02-29 01:27:52 +01:00
Günther Deschner
29222fa551 libnetjoin: Trying to avoid confusion between acct_flags, acb_info and
access_desired.

Guenther
(This used to be commit 63894e5c93ef0663fc58bcc191777cd1aca7e21c)
2008-02-29 01:25:45 +01:00
Günther Deschner
700438dbbd Fix samr querydispinfo w.r.t. lsa_AsciiStringLarge.
Thanks metze for the fix.

Guenther
(This used to be commit dcffb885bc5d16e795b71d95e0790d3d7d70cf3c)
2008-02-28 23:37:47 +01:00
Günther Deschner
de39bd20c1 Re-run make idl.
Guenther
(This used to be commit 7d88cb2e8db8789b923d8f9979b5c9f65664d3eb)
2008-02-28 23:37:18 +01:00
Stefan Metzmacher
c7d0b8f3ba samr.idl: windows uses lsa_AsciiStringLarge in QueryDisplayInfo
Tested with nt4 and w2k3.

metze
(This used to be commit 490d0c52bb117561227cbc59a15b15b688814fe2)
2008-02-28 23:31:22 +01:00
Stefan Metzmacher
5e7cc85a12 lsa.idl: strlen_m*() also for the lsa_AsciiString* versions
We already did this before b994f899b42d294c0418bdc82660a2f7510667d6.

This is needed to handle NULL strings, where strlen() would crash...

Maybe we should add a strlen_a() and strlen_a_term() later...

metze
(This used to be commit c445a17a91827c6c95b3a1cda9b78f5cdd41aa55)
2008-02-28 23:30:22 +01:00
Stefan Metzmacher
364ce40643 lsa.idl: use strlen_m_term() in lsa_StringLarge to support NULL strings
metze
(This used to be commit d98ac73122d44f3a92531b4ebbe09401652b89c7)
2008-02-28 23:30:07 +01:00
Stefan Metzmacher
48bffb0f34 lsa.idl: add lsa_AsciiStringLarge
metze
(This used to be commit bf5da9ea08f28f37aecc0674bd9322f0f0cbd82e)
2008-02-28 23:29:46 +01:00
Stefan Metzmacher
f610e1fa52 lsa.idl: don't use ascstr_noterm anymore
metze
(This used to be commit 1937d19623029cc4ac0f2c4b336b6460399fa509)
2008-02-28 23:29:35 +01:00