mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
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
This commit is contained in:
@ -1411,15 +1411,18 @@ NET_API_STATUS libnetapi_set_use_kerberos(struct libnetapi_ctx *ctx);
|
||||
NET_API_STATUS libnetapi_set_use_ccache(struct libnetapi_ctx *ctx);
|
||||
|
||||
/****************************************************************
|
||||
Return a specific libnetapi error as a string, caller must free with NetApiBufferFree
|
||||
****************************************************************/
|
||||
|
||||
const char *libnetapi_errstr(NET_API_STATUS status);
|
||||
char *libnetapi_errstr(NET_API_STATUS status);
|
||||
|
||||
/****************************************************************
|
||||
Return the last libnetapi error as a string, caller must free with NetApiBufferFree
|
||||
ctx is optional
|
||||
****************************************************************/
|
||||
|
||||
const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx,
|
||||
NET_API_STATUS status);
|
||||
char *libnetapi_get_error_string(struct libnetapi_ctx *ctx,
|
||||
NET_API_STATUS status);
|
||||
|
||||
/****************************************************************
|
||||
NetApiBufferAllocate
|
||||
|
Reference in New Issue
Block a user