svn commit: samba r6779 - in branches/SAMBA_3_0/source/lib: .
vlendec at samba.org
vlendec at samba.org
Fri May 13 12:21:35 GMT 2005
Author: vlendec
Date: 2005-05-13 12:21:35 +0000 (Fri, 13 May 2005)
New Revision: 6779
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6779
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:
branches/SAMBA_3_0/source/lib/afs.c
Changeset:
Modified: branches/SAMBA_3_0/source/lib/afs.c
===================================================================
--- branches/SAMBA_3_0/source/lib/afs.c 2005-05-13 12:05:40 UTC (rev 6778)
+++ branches/SAMBA_3_0/source/lib/afs.c 2005-05-13 12:21:35 UTC (rev 6779)
@@ -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