summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-02-11 10:32:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:55:37 -0500
commitaa9132cc55d43d9d197e3196fc7098eec6e8615a (patch)
tree265f77ad172f521c464011b60232aee5a02e7b68 /source3/lib
parentfbd9e4098333e7d121207ae6991e525768d411e0 (diff)
downloadsamba-aa9132cc55d43d9d197e3196fc7098eec6e8615a.tar.gz
samba-aa9132cc55d43d9d197e3196fc7098eec6e8615a.tar.bz2
samba-aa9132cc55d43d9d197e3196fc7098eec6e8615a.zip
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)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/afs.c4
1 files changed, 4 insertions, 0 deletions
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);