summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/privileges.c8
-rw-r--r--source3/lib/substitute.c3
2 files changed, 6 insertions, 5 deletions
diff --git a/source3/lib/privileges.c b/source3/lib/privileges.c
index 3e2c756849..9f155acd8b 100644
--- a/source3/lib/privileges.c
+++ b/source3/lib/privileges.c
@@ -40,7 +40,7 @@ typedef struct {
static bool get_privileges( const DOM_SID *sid, SE_PRIV *mask )
{
TDB_CONTEXT *tdb = get_account_pol_tdb();
- fstring keystr;
+ fstring tmp, keystr;
TDB_DATA data;
/* Fail if the admin has not enable privileges */
@@ -54,7 +54,7 @@ static bool get_privileges( const DOM_SID *sid, SE_PRIV *mask )
/* PRIV_<SID> (NULL terminated) as the key */
- fstr_sprintf( keystr, "%s%s", PRIVPREFIX, sid_string_static(sid) );
+ fstr_sprintf(keystr, "%s%s", PRIVPREFIX, sid_to_string(tmp, sid));
data = tdb_fetch_bystring( tdb, keystr );
@@ -79,7 +79,7 @@ static bool get_privileges( const DOM_SID *sid, SE_PRIV *mask )
static bool set_privileges( const DOM_SID *sid, SE_PRIV *mask )
{
TDB_CONTEXT *tdb = get_account_pol_tdb();
- fstring keystr;
+ fstring tmp, keystr;
TDB_DATA data;
if ( !lp_enable_privileges() )
@@ -95,7 +95,7 @@ static bool set_privileges( const DOM_SID *sid, SE_PRIV *mask )
/* PRIV_<SID> (NULL terminated) as the key */
- fstr_sprintf( keystr, "%s%s", PRIVPREFIX, sid_string_static(sid) );
+ fstr_sprintf(keystr, "%s%s", PRIVPREFIX, sid_to_string(tmp, sid));
/* no packing. static size structure, just write it out */
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index b456b9b992..3fbdd2859e 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -302,13 +302,14 @@ static char * realloc_expand_env_var(char *str, char *p)
static char *longvar_domainsid( void )
{
DOM_SID sid;
+ fstring tmp;
char *sid_string;
if ( !secrets_fetch_domain_sid( lp_workgroup(), &sid ) ) {
return NULL;
}
- sid_string = SMB_STRDUP( sid_string_static( &sid ) );
+ sid_string = SMB_STRDUP( sid_to_string( tmp, &sid ) );
if ( !sid_string ) {
DEBUG(0,("longvar_domainsid: failed to dup SID string!\n"));