From aa9132cc55d43d9d197e3196fc7098eec6e8615a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 11 Feb 2005 10:32:46 +0000 Subject: r5331: Support SIDs as %s replacements in the afs username map parameter. Add 'log nt token command' parameter. If set, %s is replaced with the user sid, and %t takes all the group sids. Volker (This used to be commit e7dc9fde45c750013ad07f584599dd51f8eb8a54) --- source3/lib/afs.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/lib') diff --git a/source3/lib/afs.c b/source3/lib/afs.c index 5ff027ee01..7f79429b9e 100644 --- a/source3/lib/afs.c +++ b/source3/lib/afs.c @@ -214,12 +214,16 @@ BOOL afs_login(connection_struct *conn) char *cell; BOOL result; char *ticket_str; + 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)); + /* The pts command always generates completely lower-case user * names. */ strlower_m(afs_username); -- cgit