1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

52 Commits

Author SHA1 Message Date
Rusty Russell
06731bc28f source3/netapi: fix only caller which doesn't set up a talloc_stackframe()
libnetapi_free() needs a stackframe too; looked like Andrew and Günther
missed this in a37de9a95974c138d264d9cb0c7829bb426bb2d6.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:28 +09:30
Günther Deschner
d66d7c2b00 s3-netapi: remove pointless use_memory_krb5_ccache.
This breaks the ABI.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 26 13:23:58 CEST 2011 on sn-devel-104
2011-10-26 13:23:58 +02:00
Günther Deschner
a9a81648e9 s3-netapi: allow to use default krb5 credential cache for libnetapi users.
Guenther
2011-09-21 17:39:08 +02:00
Michael Adam
2c3a1f44fa s3:libnetapi: use lp_load_global() 2011-07-28 11:17:30 +02:00
Andrew Bartlett
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Volker Lendecke
af9afe9f4f s3: Fix Coverity ID 2573: UNUSED_VALUE
Andrew B., please check!
2011-05-20 13:26:04 +02:00
Andrew Bartlett
ef2a7c6538 s3-netapi Initialise global variables in libnetapi
It is important to initalise the global variables when loading this
configuration for the potentially first time.

Andrew Bartlett
2011-05-13 18:50:23 +02:00
Andrew Bartlett
a37de9a959 s3-libnetapi Don't create a talloc_stackframe() in a global variable
This also ensures that libnetapi_free() invalidates the global
stat_ctx variable, and changes the API so that the behaviour of the
error string routines is to consistently return a allocated string.

Pair-Programmed-With: Günther Deschner <gd@samba.org>

Andrew Bartlett
2011-05-13 18:50:23 +02:00
Andrew Bartlett
e3138f2ffe s3-lib Move isvalid83_w to mangle_hash.c
This means that there is no need for the 'valid.dat' table to be
loaded by anything other than smbd, so the unloader is also removed.

The concept of a 'valid dos character' has been replaced by the hash2
mangle method.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13 14:47:07 +10:00
Andrew Bartlett
1ad8e5229f lib/util/charset Add back setlocale(), but only when called from binaries
When called from a library, we don't want to call this, as we may
overwrite some of our calling program's context.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Feb 18 09:29:35 CET 2011 on sn-devel-104
2011-02-18 09:29:35 +01:00
Andrew Bartlett
6ead7fbae5 s3-libnetapi Load case tables earlier
If we don't load the case tables as the 'first' thing we do, we will
segfault on the first case insensitive string comparison.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Nov 24 09:21:05 CET 2010 on sn-devel-104
2010-11-24 09:21:05 +01:00
Andrew Bartlett
11b060d345 s3-libnetapi Add function header comments
Andrew Bartlett
2010-11-24 08:37:04 +01:00
Andrew Bartlett
88d020ade0 s3-netapi Add libnetapi_net_init(), don't double-init common Samba subsystems
The issue here is that libnet and net were both trying to load the
smb.conf files, the case tables and set the debug levels.  The set of
the debug levels caused problems, because it would force the level to
0, not (say) 10 as requested on the command line.

This regression was apparently introduced in
cf4de8ec2c8df2ceabbe3d836d296b058e7b19fb when eliminating
AllowDebugChange.

Andrew Bartlett
2010-11-24 08:37:04 +01:00
Andrew Bartlett
cf4de8ec2c s3-debug Remove 'AllowDebugChange' and use lp_set_cmdline() instead
By removing this global variable, the API between the two different
debug systems is made more similar.  Both s3 and s4 now have
lp_set_cmdline() which ensures that the smb.conf cannot overwrite
these the user-specified log level.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Andrew Bartlett
9da4ace1d9 s3-debug Impove setup_logging() to specify logging to stderr
This change improves the setup_logging() API so that callers which
wish to set up logging to stderr can simply ask for it, rather than
directly modify the dbf global variable.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Günther Deschner
ca765d2f50 s3-build: only include krb5 environment variables where required.
Guenther
2010-08-26 00:20:29 +02:00
Günther Deschner
c136b84f0d s3-secrets: only include secrets.h when needed.
Guenther
2010-08-05 10:12:25 +02:00
Volker Lendecke
aa837d4aee s3: add libnetapi_set_use_ccache() 2010-01-24 20:32:17 +01:00
Volker Lendecke
3edcd55bf1 Remove gencache_init/shutdown
gencache_get/set/del/iterate call gencache_init() internally anyway. And we've
been very lazy calling gencache_shutdown, so this seems not really required.
2009-07-15 10:55:20 +02:00
David Markey
55ed0be65f Fix bug 6514: net gives unhelpful "lp_load failed" when it's missing smb.conf 2009-06-29 08:12:48 +02:00
Günther Deschner
e480162e5b netapi: add NetApiBufferAllocate.
Guenther
(This used to be commit 99cc8f023b4ad9210b677e11371f404048752031)
2008-08-11 19:03:49 +02:00
Günther Deschner
352d40c066 netapi: add libnetapi_samr_free().
Guenther
(This used to be commit 3228088a0954ac25584d06a681f4e0615dee425c)
2008-07-18 16:52:42 +02:00
Günther Deschner
3f0da66d5c netapi: add libnetapi_private_ctx and init function.
Guenther
(This used to be commit 45fff2d37ae21c76d100f66d9154f6add446f380)
2008-07-18 16:51:48 +02:00
Günther Deschner
4500f1d584 netapi: Fix Bug #5545 (libnetapi_init without $USER)
Based on patch from Erik van Pienbroek.

Guenther
(This used to be commit 71f4cf773022525ba617f09c495dbff97f8eb2d5)
2008-06-17 10:49:38 +02:00
Günther Deschner
08cc63f814 libnetapi: Disable talloc_enable_leak_report.
Guenther
(This used to be commit 4ba98dd0cc13984a8dc54e4d4935487fc8938039)
2008-04-17 14:13:13 +02:00
Günther Deschner
46e6bc1153 libnetapi: do not overwrite status in libnetapi_get_error_string().
Guenther
(This used to be commit 143e2b573043dd04a6404fc91d781e8a727bd092)
2008-04-16 00:15:39 +02:00
Günther Deschner
aea1a244ee libnetapi: add libnetapi_set_use_kerberos
Don't unconditionally set the kerberos flag for authentication.

Guenther
(This used to be commit 15bef5ae413adf278cccc0e547c4b8ccd180eca2)
2008-04-13 19:25:59 +02:00
Günther Deschner
e39f02217a libnetapi: don't to try to free NULL struct.
Guenther
(This used to be commit eb33d30d80ab2fe770e248f5b2a70a83a43dd156)
2008-04-13 17:39:29 +02:00
Michael Adam
ecd46b8ad4 libnetapi: fix interactive logging by preventing setup_logging from closing stderr.
Michael
(This used to be commit 563b837b76e3a6086051fc56e0522b841939d37f)
2008-04-12 02:05:25 +02:00
Günther Deschner
aeb7f7db40 Use libnetapi_open_ipc_connection in libnetapi.
Guenther
(This used to be commit d9f19fc61586d606393368799dee9757c169d602)
2008-04-10 22:04:04 +02:00
Günther Deschner
0f86cc18ff Prefill in username in libnetapi ctx.
Guenther
(This used to be commit 394bdb89ef350db0ab6aca093054e1048a8ffe1f)
2008-04-08 14:29:21 +02:00
Günther Deschner
fee1ab1049 In libnetapi, point out that lp_load has failed.
Guenther
(This used to be commit be673bfc61559f661040c6fb1ba7d2e4552967f2)
2008-03-06 09:52:06 +01:00
Günther Deschner
77a2531810 Only set DEBUGLEVEL to 0 in libnetapi when not set already.
Guenther
(This used to be commit 3ace1601ac5b5d87d6bfd8aa0afe0c75858b6990)
2008-02-28 17:25:33 +01:00
Günther Deschner
a30361ede3 No need to close registry on libnetapi_free() anymore.
Guenther
(This used to be commit 6bf75652ef07f5a534cef5034b7aad4fdcbcd265)
2008-01-25 17:21:19 +01:00
Günther Deschner
c2ff6c94f2 Improve libnetapi_set_error_string().
Guenther
(This used to be commit 96f645553ae5c75aabfe588e1a67f3d4bfacb5cb)
2008-01-18 02:54:29 +01:00
Günther Deschner
4eed7883bb Refactor libnetapi error string functions a bit.
Guenther
(This used to be commit 3b450a8bcc97b6d03c4b7b9373a3a382c0fcea30)
2008-01-11 15:09:54 +01:00
Günther Deschner
a01dc30db7 Add NetApiBufferFree() to libnetapi.
Guenther
(This used to be commit c49196954d38f0c2851abbfe25086cd6fe660a2e)
2008-01-08 11:59:01 +01:00
Günther Deschner
ab216a1b4e Fix crash bug when strequal is used too late in libnetapi_free.
Guenther
(This used to be commit ba2b8a310e1d6f78116350e24c17ae4db08b9bed)
2008-01-08 11:59:01 +01:00
Günther Deschner
e3ea1e1391 Enable talloc reporting in libnetapi if DEVELOPER compiled.
Guenther
(This used to be commit 01e9151546a83e0c772a144efa85437ca0c8a307)
2008-01-07 22:57:30 +01:00
Günther Deschner
751fc874be Add libnetapi_set_error_string and libnetapi_get_error_string.
Guenther
(This used to be commit f8806bad8134d544229c426f58bee143ba752cf8)
2008-01-07 20:13:18 +01:00
Günther Deschner
1fba8c8019 Let libnetapi use it's own krb5 cred cache in memory if necessary.
Guenther
(This used to be commit 863fb30038e384585502f0154a742481594b99d0)
2008-01-07 20:12:38 +01:00
Günther Deschner
cc1982ab1c Close registry in libnetapi_free().
Guenther
(This used to be commit e7258a4408e40686ff090d0f8e120ce78acbd097)
2008-01-07 19:38:10 +01:00
Günther Deschner
fa1e5e95d5 Add NET_API_STATUS_SUCCESS define.
Guenther
(This used to be commit a72ad63163a8c642ea762087a739e6d63c37647a)
2008-01-07 19:37:54 +01:00
Günther Deschner
be7df54c39 Fix two memleaks in libnetapi.
Guenther
(This used to be commit d73bde99e8518607bb78b5625ce5fb1991d8e402)
2008-01-07 12:48:21 +01:00
Günther Deschner
d230cd8dd5 Make libnetapi_errstr use our NTSTATUS and WERROR error string macros.
Guenther
(This used to be commit e46aa35d432e930835206b9ce7583f46933015d8)
2007-12-21 15:30:29 +01:00
Günther Deschner
9518d738b1 Add error string for access denied in libnetapi.
Guenther
(This used to be commit 4df868e3c366958c64ed8445489c8d1e8a28e50b)
2007-12-21 15:29:11 +01:00
Günther Deschner
af08d8be30 Add libnetapi_errstr().
Guenther
(This used to be commit 465e61a3599a277366ada6ecda3a1e6ddb1f2490)
2007-12-21 15:29:11 +01:00
Günther Deschner
fb2c13fe19 Add static libnetapi_ctx.
Guenther
(This used to be commit 97449ea341539a709953a57869570cf13be0f44e)
2007-12-21 15:29:10 +01:00
Günther Deschner
d14ee1dc08 Use full string based debug_parse_levels in libnetapi.
Guenther
(This used to be commit 78d8f0e41aa3db0060596a7b345c2f04261986e0)
2007-12-21 15:29:10 +01:00
Günther Deschner
c9b44e0fc3 Add basic credential functions for libnetapi.
Guenther
(This used to be commit 7c38f706b5dc17f15708ac932c84d863a0cc713e)
2007-12-21 15:29:10 +01:00