summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/afs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/lib/afs.c b/source3/lib/afs.c
index 7f79429b9e..b8173f7cc1 100644
--- a/source3/lib/afs.c
+++ b/source3/lib/afs.c
@@ -209,20 +209,21 @@ char *afs_createtoken_str(const char *username, const char *cell)
BOOL afs_login(connection_struct *conn)
{
+ extern struct current_user current_user;
DATA_BLOB ticket;
pstring afs_username;
char *cell;
BOOL result;
char *ticket_str;
- DOM_SID user_sid;
+ const DOM_SID *user_sid;
struct ClearToken ct;
pstrcpy(afs_username, lp_afs_username_map());
standard_sub_conn(conn, afs_username, sizeof(afs_username));
- if (NT_STATUS_IS_OK(uid_to_sid(&user_sid, conn->uid)))
- pstring_sub(afs_username, "%s", sid_string_static(&user_sid));
+ user_sid = &current_user.nt_user_token->user_sids[0];
+ pstring_sub(afs_username, "%s", sid_string_static(user_sid));
/* The pts command always generates completely lower-case user
* names. */