1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
samba-mirror/source
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
..
aparser replaced stdio in many parts of samba with a XFILE. XFILE is a cut-down 0001-01-01 00:00:00 +00:00
auth A nice *big* change to the fundemental way we do things. 0001-01-01 00:00:00 +00:00
bin Add a very trivial talloc torture program, bin/talloctort. Not built 0001-01-01 00:00:00 +00:00
client Move the bang (!) command back to the bottom of the list, allowing smbclient 0001-01-01 00:00:00 +00:00
codepages removed old unused files 0001-01-01 00:00:00 +00:00
groupdb A nice *big* change to the fundemental way we do things. 0001-01-01 00:00:00 +00:00
include A nice *big* change to the fundemental way we do things. 0001-01-01 00:00:00 +00:00
intl Fixed all uses of tdb_fetch/store/_int to use explicit int32 little endian 0001-01-01 00:00:00 +00:00
lib A nice *big* change to the fundemental way we do things. 0001-01-01 00:00:00 +00:00
libads much better support for organisational units in ADS join 0001-01-01 00:00:00 +00:00
libsmb Made a debug look nicer. 0001-01-01 00:00:00 +00:00
locking Debugs that print out a share mode table in debug level 10. This code 0001-01-01 00:00:00 +00:00
msdfs get rid of compiler warnings (casts and delete unused variables) 0001-01-01 00:00:00 +00:00
nmbd Fix name register bug with non-existent wins server. 0001-01-01 00:00:00 +00:00
nsswitch Fix from 2.2. It didn't break on HEAD because it isn't being compiled. Herb? 0001-01-01 00:00:00 +00:00
pam_smbpass updates from 2.2 0001-01-01 00:00:00 +00:00
param Separate out get_user_home_dir() from get_user_home_service_dir(). 0001-01-01 00:00:00 +00:00
passdb A nice *big* change to the fundemental way we do things. 0001-01-01 00:00:00 +00:00
po added fr.msg from Fanch 0001-01-01 00:00:00 +00:00
popt stop popt from doing its own intl stuff 0001-01-01 00:00:00 +00:00
printing Removed MAXSTATUS which was set incorrectly - thus causing tdb traversal 0001-01-01 00:00:00 +00:00
profile Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 0001-01-01 00:00:00 +00:00
rpc_client Add prs_dump_before to dump everything from the start of the prs 0001-01-01 00:00:00 +00:00
rpc_parse Added PRINTER_INFO_4/PRINTER_INFO_5, we're seeing level 5 requested on the wire... so. 0001-01-01 00:00:00 +00:00
rpc_server A nice *big* change to the fundemental way we do things. 0001-01-01 00:00:00 +00:00
rpcclient Converted getprinterdriver to WERROR - it always returns dos error 6 0001-01-01 00:00:00 +00:00
script much better ADS error handling system 0001-01-01 00:00:00 +00:00
smbd A nice *big* change to the fundemental way we do things. 0001-01-01 00:00:00 +00:00
smbwrapper Got medieval on another pointless extern. Removed extern struct ipzero 0001-01-01 00:00:00 +00:00
tdb Move SAFE_FREE into tdb.c to stop exporting it into tdb.h namespace. 0001-01-01 00:00:00 +00:00
tests added a simple test to see whether building shared libraries actually 0001-01-01 00:00:00 +00:00
torture Quieten some pointer cast warnings. 0001-01-01 00:00:00 +00:00
ubiqx Again, just syncronizing. The a function name was changed in the sll 0001-01-01 00:00:00 +00:00
utils much better support for organisational units in ADS join 0001-01-01 00:00:00 +00:00
web A nice *big* change to the fundemental way we do things. 0001-01-01 00:00:00 +00:00
.cvsignore Ignore dmalloc.log. 0001-01-01 00:00:00 +00:00
.dmallocrc Sample configuration for dmalloc. 0001-01-01 00:00:00 +00:00
acconfig.h We need to test for major/minor macros. 0001-01-01 00:00:00 +00:00
aclocal.m4 Added SWAT i18n feature: 0001-01-01 00:00:00 +00:00
architecture.doc first pass at updating head branch to be to be the same as the SAMBA_2_0 branch 0001-01-01 00:00:00 +00:00
change-log
CodingSuggestions added "net join" command 0001-01-01 00:00:00 +00:00
config.guess By popular demand: a new config.guess and config.sub 0001-01-01 00:00:00 +00:00
config.sub By popular demand: a new config.guess and config.sub 0001-01-01 00:00:00 +00:00
configure rerun autoconf 0001-01-01 00:00:00 +00:00
configure.developer Change ./configure.developer to stay in effect across a 0001-01-01 00:00:00 +00:00
configure.in I like --enable-developer, but I find it rather usless when all it gets me is a 0001-01-01 00:00:00 +00:00
configure.nodebug.developer computer too slow to compile with debug info (100mins), but i need all the 0001-01-01 00:00:00 +00:00
Doxyfile Fixed typo. 0001-01-01 00:00:00 +00:00
dynconfig.c Move all other paths into dynconfig 0001-01-01 00:00:00 +00:00
install-sh
internals.doc The big character set handling changeover! 0001-01-01 00:00:00 +00:00
mainpage.dox Make CodingSuggestions show up in the Doxygen pages. 0001-01-01 00:00:00 +00:00
Makefile.in A nice *big* change to the fundemental way we do things. 0001-01-01 00:00:00 +00:00
parsing.doc
smbadduser