1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
samba-mirror/source/lib
Andrew Bartlett 1d86c7f942 A nice *big* change to the fundemental way we do things.
Samba (ab)uses the returns from getpwnam() a lot - in particular it keeps
them around for a long time - often past the next call...

This adds a getpwnam_alloc and a getpwuid_alloc to the collection.

These function as expected, returning a malloced structure that can be
free()ed with passwd_free(&passwd).

This patch also cuts down on the number of calls to getpwnam - mostly by
taking advantage of the fact that the passdb interface is already
case-insensiteve.

With this patch most of the recursive cases have been removed (that I know
of) and the problems are reduced further by not using the sys_ interface
in the new code.  This means that pointers to the cache won't be affected.
(This is a tempoary HACK, I intend to kill the password cache entirly).

The only change I'm a little worried about is the change to
rpc_server/srv_samr_nt.c for private groups.  In this case we are getting
groups from the new group mapping DB.  Do we still need to check for private
groups?  I've toned down the check to a case sensitve match with the new code,
but we might be able to kill it entirly.

I've also added a make_modifyable_passwd() function, that copies a passwd
struct into the form that the old sys_getpw* code provided.  As far as I can
tell this is only actually used in the pass_check.c crazies, where I moved
the final 'special case' for shadow passwords (out of _Get_Pwnam()).

The matching case for getpwent() is dealt with already, in lib/util_getent.c

Also included in here is a small change to register the [homes] share at vuid
creation rather than just in one varient of the session setup.  (This picks
up the SPNEGO cases).  The home directory is now stored on the vuid, and I
am hoping this might provide a saner way to do %H substitions.

TODO:  Kill off remaining Get_Pwnam_Modify calls (they are not needed), change
the remaining sys_getpwnam() callers to use getpwnam_alloc() and move
Get_Pwnam to return an allocated struct.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
..
.cvsignore - fixed cast warnings 0001-01-01 00:00:00 +00:00
access.c More spelling and grammer from Vance. <vance@digital-host.net> 0001-01-01 00:00:00 +00:00
account_pol.c Fixed all uses of tdb_fetch/store/_int to use explicit int32 little endian 0001-01-01 00:00:00 +00:00
bitmap.c More spelling and grammer from Vance. <vance@digital-host.net> 0001-01-01 00:00:00 +00:00
charcnv.c more irix -64 portability fixes 0001-01-01 00:00:00 +00:00
crc32.c Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 0001-01-01 00:00:00 +00:00
debug.c merge changes from 2.2 branch to prevent smb.conf from changing debug level 0001-01-01 00:00:00 +00:00
dmallocmsg.c #ifdef variable that's not used without dmalloc 0001-01-01 00:00:00 +00:00
domain_namemap.c Unicode conversion fix in Japanese environment from Motonobu TAKAHASHI. 0001-01-01 00:00:00 +00:00
dprintf.c More spelling and grammer from Vance. <vance@digital-host.net> 0001-01-01 00:00:00 +00:00
error.c Fixup error mapping so we have only one table containing errno -> dos error -> NT STATUS 0001-01-01 00:00:00 +00:00
fault.c Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 0001-01-01 00:00:00 +00:00
fsusage.c split fsusage() into a separate module (to fix linking problems with 0001-01-01 00:00:00 +00:00
genrand.c Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 0001-01-01 00:00:00 +00:00
getsmbpass.c Small tidyups for gcc in 'preen' mode.... 0001-01-01 00:00:00 +00:00
hash.c Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 0001-01-01 00:00:00 +00:00
hmacmd5.c Add backend encryption support for NTLMv2. 0001-01-01 00:00:00 +00:00
iconv.c much better auto-init of valid_table[]. This should just about remove 0001-01-01 00:00:00 +00:00
interface.c merge from APPLIANCE_HEAD 0001-01-01 00:00:00 +00:00
interfaces.c fix interfaces.c for aix 3.2.5 0001-01-01 00:00:00 +00:00
md4.c Add backend encryption support for NTLMv2. 0001-01-01 00:00:00 +00:00
md5.c Add backend encryption support for NTLMv2. 0001-01-01 00:00:00 +00:00
messages.c If we receive a message that is not handled then emit a gentle warning 0001-01-01 00:00:00 +00:00
ms_fnmatch.c a bunch of fixes from the sflight to seattle 0001-01-01 00:00:00 +00:00
netatalk.c Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 0001-01-01 00:00:00 +00:00
pidfile.c Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 0001-01-01 00:00:00 +00:00
readline.c Fix typo. 0001-01-01 00:00:00 +00:00
replace.c added strlcpy() and strlcat() 0001-01-01 00:00:00 +00:00
select.c Spelling fix. 0001-01-01 00:00:00 +00:00
signal.c fixed a bug in BlockSignals() for systems that don't have 0001-01-01 00:00:00 +00:00
smbpasswd.c Started a cleanup of smbpasswd related stuff. I've created a new file 0001-01-01 00:00:00 +00:00
smbrun.c Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 0001-01-01 00:00:00 +00:00
snprintf.c fixed a typo in vsyslog() 0001-01-01 00:00:00 +00:00
substitute.c A nice *big* change to the fundemental way we do things. 0001-01-01 00:00:00 +00:00
sysacls.c Added HPUX ACL code. 0001-01-01 00:00:00 +00:00
system.c Getting ready to add UNIX extensions in HEAD also. 0001-01-01 00:00:00 +00:00
talloc.c FIXME We should turn the global list off when using Insure++, 0001-01-01 00:00:00 +00:00
tallocmsg.c Add UNUSED(paramname) macro to be used in parameter lists, to quieten 0001-01-01 00:00:00 +00:00
talloctort.c Make talloctort call talloc_describe_all before exiting 0001-01-01 00:00:00 +00:00
time.c Round and round we go.... 0001-01-01 00:00:00 +00:00
ufc.c Fixed warnings and made const-safe so it has the correct prototype. 0001-01-01 00:00:00 +00:00
username.c A nice *big* change to the fundemental way we do things. 0001-01-01 00:00:00 +00:00
util_file.c obey "use mmap" on case tables 0001-01-01 00:00:00 +00:00
util_getent.c Added the group enum code from 2.2 0001-01-01 00:00:00 +00:00
util_pw.c A nice *big* change to the fundemental way we do things. 0001-01-01 00:00:00 +00:00
util_seaccess.c tidy up debug 0001-01-01 00:00:00 +00:00
util_sec.c Parionia to ensure people don't install libsmb based programs setuid root. 0001-01-01 00:00:00 +00:00
util_sid.c freeing the wrong pointer, sorry my mistake. 0001-01-01 00:00:00 +00:00
util_sock.c Add constness to filenames passed to functions. 0001-01-01 00:00:00 +00:00
util_str.c Roll back PSTRING_SANCTIFY patch; just leave non-controversial type 0001-01-01 00:00:00 +00:00
util_unistr.c fixed warnings on irix and crash bug on big endian machines 0001-01-01 00:00:00 +00:00
util.c Add constness to filenames passed to functions. 0001-01-01 00:00:00 +00:00
wins_srv.c Got medieval on another pointless extern. Removed extern struct ipzero 0001-01-01 00:00:00 +00:00
xfile.c Added NT_USER_TOKEN into server_info to fix extra groups problem. 0001-01-01 00:00:00 +00:00