summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/afs.c2
-rw-r--r--source3/lib/substitute.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/source3/lib/afs.c b/source3/lib/afs.c
index 61a588cfa3..11a930b8b9 100644
--- a/source3/lib/afs.c
+++ b/source3/lib/afs.c
@@ -232,7 +232,7 @@ bool afs_login(connection_struct *conn)
afs_username = talloc_sub_advanced(ctx,
SNUM(conn), conn->session_info->unix_name,
- conn->connectpath, conn->session_info->utok.gid,
+ conn->connectpath, conn->session_info->unix_token->gid,
conn->session_info->sanitized_username,
pdb_get_domain(conn->session_info->sam_account),
afs_username);
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index df217bc03f..bf3cd5d51e 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -815,11 +815,13 @@ void standard_sub_advanced(const char *servicename, const char *user,
char *standard_sub_conn(TALLOC_CTX *ctx, connection_struct *conn, const char *str)
{
+ /* Make clear that we require the optional unix_token in the source3 code */
+ SMB_ASSERT(conn->session_info->unix_token);
return talloc_sub_advanced(ctx,
lp_servicename(SNUM(conn)),
conn->session_info->unix_name,
conn->connectpath,
- conn->session_info->utok.gid,
+ conn->session_info->unix_token->gid,
get_smb_user_name(),
"",
str);