1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00
samba-mirror/source/include
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 Add the ability to display Samba's build options with smbd -b and as a level 4 0001-01-01 00:00:00 +00:00
ads.h much better ADS error handling system 0001-01-01 00:00:00 +00:00
asn_1.h Added some guards. 0001-01-01 00:00:00 +00:00
auth.h Back out the crazy notion that the NTLMSSP flags actually mean anything... 0001-01-01 00:00:00 +00:00
byteorder.h Same fix as went into 2.2 (I'm waiting for jerry to finish some code). 0001-01-01 00:00:00 +00:00
charset.h added "display charset" option in smb.conf, along with d_printf() 0001-01-01 00:00:00 +00:00
client.h struct cli_state remembers the pipe name that it's talking to, if any, 0001-01-01 00:00:00 +00:00
clitar.h Added copyright (not sure who owns it though) and #include guards. 0001-01-01 00:00:00 +00:00
config.h.in We need to test for major/minor macros. 0001-01-01 00:00:00 +00:00
debug.h allow a MAX_DEBUG_LEVEL setting in local.h (or the Makefile) 0001-01-01 00:00:00 +00:00
dlinklist.h Fix memory leak when doing DLIST_REMOVE(head,head). 0001-01-01 00:00:00 +00:00
doserr.h DOS error 31 is ERRgeneral, General Failure. This is the WERROR equivalent 0001-01-01 00:00:00 +00:00
dynconfig.h Move all other paths into dynconfig 0001-01-01 00:00:00 +00:00
hash.h fixed the really awful performance problem with the stat cache when it 0001-01-01 00:00:00 +00:00
hmacmd5.h Add backend encryption support for NTLMv2. 0001-01-01 00:00:00 +00:00
includes.h Getting ready to add UNIX extensions in HEAD also. 0001-01-01 00:00:00 +00:00
interfaces.h merge from APPLIANCE_HEAD 0001-01-01 00:00:00 +00:00
intl.h forgot to add intl.h 0001-01-01 00:00:00 +00:00
libsmbclient.h Made a libsmbclient doxygen group and moved all the libsmbclient groups 0001-01-01 00:00:00 +00:00
local.h Removed MAXSTATUS which was set incorrectly - thus causing tdb traversal 0001-01-01 00:00:00 +00:00
MacExtensions.h Adding George's Mac extension include files. 0001-01-01 00:00:00 +00:00
mapping.h added a boolean to the group mapping functions to specify if we need or 0001-01-01 00:00:00 +00:00
md5.h Try to avoid clashes with OpenSSL when built --with-ssl, they also have md5.h, 0001-01-01 00:00:00 +00:00
messages.h Add two more memory-debug smbcontrol messages: these ones should 0001-01-01 00:00:00 +00:00
msdfs.h - enable MSDFS by default, there seems no reason not to have it enabled 0001-01-01 00:00:00 +00:00
nameserv.h Process the SAM/UAS change notification message. 0001-01-01 00:00:00 +00:00
nt_printing.h Sed error. The status value in the PRINTER_INFO_2 structure isn't a WERROR 0001-01-01 00:00:00 +00:00
ntdomain.h Removed CHECK_STRUCT macro - it isn't used anywhere. 0001-01-01 00:00:00 +00:00
nterr.h Removed unused #define 0001-01-01 00:00:00 +00:00
passdb.h removed stuff I wasn't using 0001-01-01 00:00:00 +00:00
printing.h Fixed detection of CUPS. We need to check for the presence of the cups 0001-01-01 00:00:00 +00:00
pstring.h Roll back PSTRING_SANCTIFY patch; just leave non-controversial type 0001-01-01 00:00:00 +00:00
rap.h Added many more defines in service category, user category and others 0001-01-01 00:00:00 +00:00
rpc_brs.h converted another bunch of stuff to NTSTATUS 0001-01-01 00:00:00 +00:00
rpc_client_proto.h - added test for vasprintf 0001-01-01 00:00:00 +00:00
rpc_client.h rpcclient merge from 2.2 (including Jeremy's non-void return fix) 0001-01-01 00:00:00 +00:00
rpc_creds.h Fixed some more client SPOOLSS functions. The following 0001-01-01 00:00:00 +00:00
rpc_dce.h converted another bunch of stuff to NTSTATUS 0001-01-01 00:00:00 +00:00
rpc_dfs.h Moved and renamed DFS error constants from include/rpc_dfs.h to doserr.h to 0001-01-01 00:00:00 +00:00
rpc_lsa.h Correct4ed comment. 0001-01-01 00:00:00 +00:00
rpc_misc.h Merge of sam sync code from TNG. 0001-01-01 00:00:00 +00:00
rpc_netlogon.h decoded SAM_DELTA 0x0e and 0x12. 0001-01-01 00:00:00 +00:00
rpc_parse.h brought across some rpc header files from tng 0001-01-01 00:00:00 +00:00
rpc_reg.h Add 'net rpc shutdown' and 'net rpc abortshutdown'. 0001-01-01 00:00:00 +00:00
rpc_samr.h Make user enumeration work for w2k and win9x. 0001-01-01 00:00:00 +00:00
rpc_secdes.h Renamed sid field in SEC_ACE to trustee to be more in line with MS's 0001-01-01 00:00:00 +00:00
rpc_spoolss.h 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_srvsvc.h converted another bunch of stuff to NTSTATUS 0001-01-01 00:00:00 +00:00
rpc_wkssvc.h converted another bunch of stuff to NTSTATUS 0001-01-01 00:00:00 +00:00
safe_string.h Roll back PSTRING_SANCTIFY patch; just leave non-controversial type 0001-01-01 00:00:00 +00:00
secrets.h added "net join" command 0001-01-01 00:00:00 +00:00
session.h A few changes: 0001-01-01 00:00:00 +00:00
sids.h Added global_sid_NULL S-1-0-0 to list of global sids. 0001-01-01 00:00:00 +00:00
smb_acls.h Added HPUX ACL code. 0001-01-01 00:00:00 +00:00
smb_macros.h Added CIFS UNIX extension code to client. 0001-01-01 00:00:00 +00:00
smb.h A nice *big* change to the fundemental way we do things. 0001-01-01 00:00:00 +00:00
smbprofile.h added structure members referred to by recent changes in vfs-wrap.c 0001-01-01 00:00:00 +00:00
stamp-h.in Make sure that the stamp file is newer than configure.in 0001-01-01 00:00:00 +00:00
talloc.h Add talloc_asprintf_append, which grows an existing string buffer to 0001-01-01 00:00:00 +00:00
trans2.h Merged in %S fixes and XX_NOT_CHANGED fixes from 2.2. 0001-01-01 00:00:00 +00:00
util_getent.h Added the group enum code from 2.2 0001-01-01 00:00:00 +00:00
util_list.h Fixed some more client SPOOLSS functions. The following 0001-01-01 00:00:00 +00:00
version.h preparing for release of 3.0-alpha13 0001-01-01 00:00:00 +00:00
vfs.h Getting ready to add UNIX extensions in HEAD also. 0001-01-01 00:00:00 +00:00
vt_mode.h Initial version imported to CVS 0001-01-01 00:00:00 +00:00
xfile.h declare dbf in one spot 0001-01-01 00:00:00 +00:00