summaryrefslogtreecommitdiff
path: root/source3/smbd/password.c
AgeCommit message (Collapse)AuthorFilesLines
2008-11-06Add wrapper str_list_make_v3() to replace the old S3 behavior ofJeremy Allison1-1/+1
str_list_make(). From Dan Sledz <dan.sledz@isilon.com>: In samba 3.2 passing NULL or an empty string returned NULL. In master, it now returns a list of length 1 with the first string set to NULL (an empty list). Jeremy.
2008-10-12Use common strlist implementation in Samba 3 and Samba 4.Jelmer Vernooij1-2/+2
2008-06-19Wrap the unix token info in a unix_user_token in auth_serversupplied_infoVolker Lendecke1-3/+3
No functional change, this is a preparation for more current_user ref removal (This used to be commit dcaedf345e62ab74ea87f0a3fa1e3199c75c5445)
2008-06-14Move connection-specific vuid cache clear to uid.cVolker Lendecke1-1/+1
(This used to be commit 1025f687910ce40283c7344ed67ebd5bf31217b7)
2008-05-06Fix a memleak introduced after refactoring "struct user_struct"Volker Lendecke1-1/+1
(This used to be commit e70b5b762234f1733f150bdfbda7b208a8139990)
2008-05-05Remove "userdom_struct user" from "struct user_struct"Volker Lendecke1-24/+25
(This used to be commit 420de035237bb08bc470c9eb820f3da2edaa6805)
2008-05-05Remove "session_key" from "struct user_struct"Volker Lendecke1-6/+1
This one took a bit -- I hope I covered all data paths (This used to be commit 74c88a44422f88d6e2f2cdbfdfa0bafe0dbe06c4)
2008-05-05Remove "guest" from "struct user_struct"Volker Lendecke1-4/+3
(This used to be commit 570a6b80feb5b0dc23213ba936c721e766cd4818)
2008-05-05Remove the unix token info from "struct user_struct"Volker Lendecke1-22/+4
(This used to be commit aa2299d42adf4d27e707ac755e07be70d0af1bb4)
2008-05-05Remove "nt_user_token" from "struct user_struct"Volker Lendecke1-3/+1
(This used to be commit 51d5d512f28eadc74eced43e5e7f4e5bdff3ff69)
2008-05-05Remove "logon_script" from "struct user_struct"Volker Lendecke1-8/+0
(This used to be commit b36fd84186a656f86e4cfb9166fc0ecbffb422cb)
2008-05-05Remove unix_homedir from struct user_structVolker Lendecke1-37/+35
This makes pdb_get_unix_homedir unused. I wonder if that was ever really used... (This used to be commit 36bfd32f1ff878e827db91e9bf233719ecca5b01)
2008-05-05Remove "homedir" from "struct user_struct"Volker Lendecke1-6/+0
(This used to be commit 41f9afd62d8cc6067582d452f3d53a5c67253b69)
2008-02-14Ensure invalidate_vuid() deletes any ntlmssp state.Jeremy Allison1-0/+4
Jeremy. (This used to be commit b41799c351c72b268ef094047a51766747671280)
2008-02-04str_list_free is not needed anymoreVolker Lendecke1-4/+2
(This used to be commit feddc1447d585fd108d22a36bccc576fa81197ef)
2008-02-04Always pass a TALLOC_CTX to str_list_make and str_list_copyVolker Lendecke1-4/+5
(This used to be commit e2c9fc4cf5f0ff725330fa44f53782db65fca37e)
2008-01-23strtok -> strtok_rVolker Lendecke1-4/+8
(This used to be commit fd34ce437057bb34cdc37f4b066e424000d36789)
2007-12-19Remove Get_Pwnam and its associated static variableVolker Lendecke1-1/+4
All callers are replaced by Get_Pwnam_alloc (This used to be commit 735f59315497113aebadcf9ad387e3dbfffa284a)
2007-12-10Simplify add_session_userVolker Lendecke1-33/+25
(This used to be commit f98082ccf048a2de6fea8d922264879305b3d2c8)
2007-11-29Remove PSTRING_LEN from smbd/ nmbd/.Jeremy Allison1-3/+3
Remove pstring from libsmb/clidfs.c except for a nasty hack (that will be removed when pstrings are gone from client/). Jeremy. (This used to be commit cc257b71d13daa47e6f2315d0f07a60eb4aaeca6)
2007-11-16Fix an implicit cast warning.Michael Adam1-1/+1
Michael (This used to be commit 4ab3b23a630e822e3fdf1ab4d08330625b0e4fb6)
2007-11-13Remove last pstring from smbd/*.cJeremy Allison1-25/+45
Jeremy. (This used to be commit f1680bada913af4eaf5c0d686983018d6c8b3e5f)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-8/+8
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10r24590: Reformatting to coding standards. Added my (C) in places it already ↵Jeremy Allison1-19/+22
should have been :-). Jeremy. (This used to be commit 41611a22ed852bb74e2ef3f45766c0580ffd3a18)
2007-10-10r24589: Refactor our vuid code so that we keep the sameJeremy Allison1-132/+165
vuid that was allocated whilst the connection is being constructed and after the connection has been set up. This is what Windows does and at least one client (and HP printer) depends on this behaviour. As it depends on the req struct not yet ported to SAMBA_3_2_0 (Volker, hint hint.... :-) I am not yet adding this to that branch, but will investigate that tomorrow. Jeremy. (This used to be commit a54f2805df92c67e74a6764568eedebe394fd500)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23510: Tidy calls to smb_panic by removing trailing newlines. Print theJames Peach1-1/+1
failed expression in SMB_ASSERT. (This used to be commit 171dc060e2a576d724eed1ca65636bdafffd7713)
2007-10-10r22542: Move over to using the _strict varients of the tallocJeremy Allison1-1/+1
calls. No functional changes. Looks bigger than it is :-). Jeremy. (This used to be commit f6fa3080fee1b20df9f1968500840a88cf0ee592)
2007-10-10r22020: Make it more clear that both the vuser struct and it's contents areAndrew Bartlett1-39/+25
talloc_free()'ed at the end of a session. Rework the passwd cache code to use talloc_unlink and talloc_reference, to more carefully manage the cache. Andrew Bartlett (This used to be commit e3e0ec25e67308de314aa61852905ee42aa2c8fe)
2007-10-10r21460: Fix for server-side processing of SPNEGO authJeremy Allison1-0/+1
fragmented into "max xmit" size security blob chunks. Bug #4400. Needs limits adding, and also a client-side version. Jeremy. (This used to be commit aa69f2481aafee5dccc3783b8a6e23ca4eb0dbfa)
2007-10-10r21128: Fix Vista connecting to Samba in share level security.Jeremy Allison1-0/+25
Vista sends the NTLMv2 blob by default in the tconX packet. Make sure we save off the workgroup the user was logged into on the client in the sessionsetupX and re-use it for the NTLMv2 calc. Jeremy. (This used to be commit 45dcf62960c2815c4d8e0c5f4a2d0af24df83290)
2007-10-10r17408: Let us use netgroups even without a NIS domain but just using filesSimo Sorce1-4/+3
(This used to be commit c065341d3ffc9125514f563c63d416cf7c40375f)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-9/+10
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r15589: While trying to understand the vuid code I found that security=share ↵Volker Lendecke1-3/+2
is broken right now. r14112 broke it, in 3.0.22 register_vuid for security=share returns UID_FIELD_INVALID which in current 3_0 is turned into an error condition. This makes sure that we only call register_vuid if sec!=share and meanwhile also fixes a little memleak. Then I also found a crash in smbclient with sec=share and hostmsdfs=yes. There's another crash with sec=share when coming from w2k3, but I need sleep now. Someone (jerry,jra?) please review the sesssetup.c change. Thanks, Volker (This used to be commit 8059d0ae395604503cad3d9f197928305923e3f5)
2007-10-10r15583: Add a comment while trying to understand this codeVolker Lendecke1-0/+5
(This used to be commit 7945c935bf197afb61286ddeb0e579078362a1fc)
2007-10-10r14112: * fix checks on return code from register_vuid() which could actuallyGerald Carter1-1/+1
fail and we would still return success in the SMBsesssetup reply :-( * Make sure to create the local token for the server_fino struct in reply_spnego_kerberos() so that register_vuid() does not fail. (how did this ever work?) (This used to be commit 8dafa45b97020d1aceb027a85e18401c965bf402)
2007-10-10r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison1-1/+1
realloc can return NULL in one of two cases - (1) the realloc failed, (2) realloc succeeded but the new size requested was zero, in which case this is identical to a free() call. The error paths dealing with these two cases should be different, but mostly weren't. Secondly the standard idiom for dealing with realloc when you know the new size is non-zero is the following : tmp = realloc(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } However, there were *many* *many* places in Samba where we were using the old (broken) idiom of : p = realloc(p, size) if (!p) { return error; } which will leak the memory pointed to by p on realloc fail. This commit (hopefully) fixes all these cases by moving to a standard idiom of : p = SMB_REALLOC(p, size) if (!p) { return error; } Where if the realloc returns null due to the realloc failing or size == 0 we *guarentee* that the storage pointed to by p has been freed. This allows me to remove a lot of code that was dealing with the standard (more verbose) method that required a tmp pointer. This is almost always what you want. When a realloc fails you never usually want the old memory, you want to free it and get into your error processing asap. For the 11 remaining cases where we really do need to keep the old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR, which can be used as follows : tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the pointer p, even on size == 0 or realloc fail. All this is done by a hidden extra argument to Realloc(), BOOL free_old_on_error which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR macros (and their array counterparts). It remains to be seen what this will do to our Coverity bug count :-). Jeremy. (This used to be commit 1d710d06a214f3f1740e80e0bffd6aab44aac2b0)
2007-10-10r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()Gerald Carter1-5/+5
macro which sets the freed pointer to NULL. (This used to be commit b65be8874a2efe5a4b167448960a4fcf6bd995e2)
2007-10-10r13494: Merge the stuff I've done in head the last days.Volker Lendecke1-0/+129
Volker (This used to be commit bb40e544de68f01a6e774753f508e69373b39899)
2007-10-10r13316: Let the carnage begin....Gerald Carter1-54/+89
Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
2007-10-10r12311: ReformattingVolker Lendecke1-15/+23
(This used to be commit 23f5be1dcbb9e5a1e7f24813c67009056b07d59c)
2007-10-10r12305: ReformattingVolker Lendecke1-8/+20
(This used to be commit f574e980aac5bae5e1e3cc23ec648b69a87eb04a)
2007-10-10r8472: abartlet's patch for parallel ntlmssp ↵Gerald Carter1-1/+36
supporttrunk/source/smbd/sesssetup.c (This used to be commit aab17a7095a18b243a271f8f3f824facd6932f23)
2007-10-10r7882: Looks like a large patch - but what it actually does is make SambaJeremy Allison1-2/+2
safe for using our headers and linking with C++ modules. Stops us from using C++ reserved keywords in our code. Jeremy (This used to be commit 9506b8e145982b1160a2f0aee5c9b7a54980940a)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-4/+4
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r2899: Change some #if DEBUG_PASSWORD's to #ifdef DEBUG_PASSWORD.Tim Potter1-1/+1
Bugzilla #1903. (This used to be commit 1327d83d902b6a39096d387d734e73d85ed53f85)
2007-10-10r2082: lp_path should be lp_pathname.Jeremy Allison1-1/+1
Paranoia fix on mangle prefix. Jeremy. (This used to be commit cc91bbe20d9cb26e52ad417f279e2d60c85af2dc)
2007-10-10r2077: fix logic bug in the check for creating a user's home directory in ↵Gerald Carter1-10/+13
register_vuid(); add a few extra debug lines (This used to be commit 02571e7f5040a577840c969ff9c46a1e533edc21)
2007-10-10r1506: Fix inspired by patches from Michael Collin Nielsen ↵Jeremy Allison1-11/+15
<michael@hum.aau.dk> - ensure home directory service number is correctly reused. Jeremy. (This used to be commit 9d6347be8580d092cda0357b5d1a81fc6876ac1f)