standard_sub_basic() and current_user_info
Andrew Bartlett
abartlet at samba.org
Thu Mar 18 21:45:20 GMT 2004
On Fri, 2004-03-19 at 08:22, Gerald (Jerry) Carter wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Can someone please tell me if the current_user_info
> struct should still be used in the 3.0 tree ? It's used
> in some places but not in others and the inconsistency
> is breaking many calls to standard_sub_basic().
>
> I am working on the include = %%[GU].conf bug and just
> need to know the current convention should be.
>
> Note that standard_sub_basic() relies on current_user_info()
> for the %D expansion.
OK. That's nasty.
I think current_user_info isn't being updated right. I think the
correct solution is to make as many things as possible follow the vuid
to a the user_struct, and read information from that. The information
there is accurate - in particular, the 'server_info' substruct is the
place I've been trying to make as accurate as possible.
This information is accurate and maintained because it comes directly
from the passdb, or the info3 on a netlogon.
The root of the problem is that change_to_user() is not updating the
entire structure, I think. I'm tending to think it shouldn't either.
For %U and %G, grab the smb_name from that same vuid based user_struct.
This will break for 'security=share' games, but I'm starting to care
less and less about getting magic expansions right in those cases...
(There is possibly more work to be done for kerberos logins).
Andrew Bartlett
--
Andrew Bartlett abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team abartlet at samba.org
Student Network Administrator, Hawker College abartlet at hawkerc.net
http://samba.org http://build.samba.org http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20040319/c643d94f/attachment.bin
More information about the samba-technical
mailing list