diff options
author | Volker Lendecke <vlendec@samba.org> | 2005-05-13 12:21:35 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:56:54 -0500 |
commit | a69fee3ca6383df87f6e5d669d532d07767bc112 (patch) | |
tree | 07717229a9125cfca04cab9c19b11c9df4d9d15b /source3/lib | |
parent | 67e03ce4663378e6c40b6bb134a5a820ac6bc8d0 (diff) | |
download | samba-a69fee3ca6383df87f6e5d669d532d07767bc112.tar.gz samba-a69fee3ca6383df87f6e5d669d532d07767bc112.tar.bz2 samba-a69fee3ca6383df87f6e5d669d532d07767bc112.zip |
r6779: Use the SID in the user token for the %s expansion in 'afs username map'. This
fixes a rather weird problem where an algorithmic SID ended up as the
replacement for %s.
Volker
(This used to be commit 67dbc91b27aeeeab3cc1360137db1dd955728061)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/afs.c | 7 |
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 = ¤t_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. */ |