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

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 a37de9a959.

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
cf4de8ec2c 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 99cc8f023b)
2008-08-11 19:03:49 +02:00
Günther Deschner
352d40c066 netapi: add libnetapi_samr_free().
Guenther
(This used to be commit 3228088a09)
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 45fff2d37a)
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 71f4cf7730)
2008-06-17 10:49:38 +02:00
Günther Deschner
08cc63f814 libnetapi: Disable talloc_enable_leak_report.
Guenther
(This used to be commit 4ba98dd0cc)
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 143e2b5730)
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 15bef5ae41)
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 eb33d30d80)
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 563b837b76)
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 d9f19fc615)
2008-04-10 22:04:04 +02:00
Günther Deschner
0f86cc18ff Prefill in username in libnetapi ctx.
Guenther
(This used to be commit 394bdb89ef)
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 be673bfc61)
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 3ace1601ac)
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 6bf75652ef)
2008-01-25 17:21:19 +01:00
Günther Deschner
c2ff6c94f2 Improve libnetapi_set_error_string().
Guenther
(This used to be commit 96f645553a)
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 3b450a8bcc)
2008-01-11 15:09:54 +01:00
Günther Deschner
a01dc30db7 Add NetApiBufferFree() to libnetapi.
Guenther
(This used to be commit c49196954d)
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 ba2b8a310e)
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 01e9151546)
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 f8806bad81)
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 863fb30038)
2008-01-07 20:12:38 +01:00
Günther Deschner
cc1982ab1c Close registry in libnetapi_free().
Guenther
(This used to be commit e7258a4408)
2008-01-07 19:38:10 +01:00
Günther Deschner
fa1e5e95d5 Add NET_API_STATUS_SUCCESS define.
Guenther
(This used to be commit a72ad63163)
2008-01-07 19:37:54 +01:00
Günther Deschner
be7df54c39 Fix two memleaks in libnetapi.
Guenther
(This used to be commit d73bde99e8)
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 e46aa35d43)
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 4df868e3c3)
2007-12-21 15:29:11 +01:00
Günther Deschner
af08d8be30 Add libnetapi_errstr().
Guenther
(This used to be commit 465e61a359)
2007-12-21 15:29:11 +01:00
Günther Deschner
fb2c13fe19 Add static libnetapi_ctx.
Guenther
(This used to be commit 97449ea341)
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 78d8f0e41a)
2007-12-21 15:29:10 +01:00
Günther Deschner
c9b44e0fc3 Add basic credential functions for libnetapi.
Guenther
(This used to be commit 7c38f706b5)
2007-12-21 15:29:10 +01:00