svn commit: samba r6780 - in trunk/source/lib: .
vlendec at samba.org
vlendec at samba.org
Fri May 13 12:21:46 GMT 2005
Author: vlendec
Date: 2005-05-13 12:21:46 +0000 (Fri, 13 May 2005)
New Revision: 6780
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6780
Log:
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
Modified:
trunk/source/lib/afs.c
Changeset:
Modified: trunk/source/lib/afs.c
===================================================================
--- trunk/source/lib/afs.c 2005-05-13 12:21:35 UTC (rev 6779)
+++ trunk/source/lib/afs.c 2005-05-13 12:21:46 UTC (rev 6780)
@@ -209,20 +209,21 @@
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. */
More information about the samba-cvs
mailing list