Michael Adam
0172587d8d
s3:auth:sam_password_ok: fix allocation of a data blob.
...
data_blob(mem_ctx, 16) does not use mem_ctx as a talloc ctx but
copies 16 bytes from mem_ctx into the newly allocated data blob.
This can not have been intentional. A blank uint8_t array of
length 16 is allocated by passing NULL instead of mem_ctx.
And using data_blob_talloc(mem_ctx, NULL, 16) adds the allocated
blank 16 byte array to mem_ctx - so this is what must have been
intended.
Michael
2010-01-07 11:07:56 +01:00
Michael Adam
7ac18c743b
s3:auth:sam_password_ok: enhance readability (imho) by adding some pointers
...
and removing bool variables and several checks.
Michael
2010-01-07 11:07:55 +01:00
Michael Adam
b5fcb34d6c
s3:check_sam_security: untangle assignment from statement
...
Michael
2010-01-07 11:07:55 +01:00
Volker Lendecke
53a1ed9b6c
s3: Factor password_in_history() out of check_passwd_history()
2010-01-07 11:07:55 +01:00
Volker Lendecke
5e2fc28b63
s3: Simplify pdb_set_plaintext_passwd: pwhistory==NULL can not happen anymore
2010-01-07 11:07:54 +01:00
Volker Lendecke
2a11f3b3d7
s3: Simplify pdb_set_plaintext_passwd: pwHistLen==0 was checked above
2010-01-07 11:07:54 +01:00
Volker Lendecke
ec0998ada5
s3: Add a paranoia check to pdb_set_plaintext_passwd()
2010-01-07 11:07:54 +01:00
Volker Lendecke
a3f522202d
s3: Simplify pdb_set_plaintext_passwd() by removing a redundant condition
...
if (current_history_len != pwHistLen) {
if (current_history_len < pwHistLen) {
}
}
The second "if" is a bit pointless here
2010-01-07 11:07:54 +01:00
Volker Lendecke
7633837026
s3: Simplify pdb_set_plaintext_passwd: memcpy deals fine with 0 bytes
2010-01-07 11:07:53 +01:00
Volker Lendecke
864ed92954
s3: Simplify pdb_set_plaintext_passwd by using talloc_zero_array
2010-01-07 11:07:53 +01:00
Volker Lendecke
e7290255f5
s3: Make use of talloc_array in pdb_set_plaintext_passwd()
2010-01-07 11:07:53 +01:00
Volker Lendecke
7ba006430f
s3: Simplify pdb_set_plaintext_passwd() a bit
...
Remove an indentation by the early return in
+ if (pwHistLen == 0) {
+ /* Set the history length to zero. */
+ pdb_set_pw_history(sampass, NULL, 0, PDB_CHANGED);
+ return true;
+ }
2010-01-07 11:07:52 +01:00
Volker Lendecke
ca6c1cdd5f
s3: Simplify pdb_set_plaintext_passwd() slightly
...
No functional change, this just removes an indentation level by the early
"return True;" in
+ if ((pdb_get_acct_ctrl(sampass) & ACB_NORMAL) == 0) {
+ /*
+ * No password history for non-user accounts
+ */
+ return true;
+ }
Volker
2010-01-07 11:07:52 +01:00
Volker Lendecke
3d8394986a
s3: Fix a typo
2010-01-07 11:07:52 +01:00
Volker Lendecke
147a2c057c
s3: Avoid a memset(, 0, ) call
2010-01-07 11:07:51 +01:00
Michael Adam
2fad148b27
s3:pdb_set_pw_history: free the old history before setting the new.
...
This is not strictly necessary, since this only leaks into the
struct samu, and this is not so long-lived in the code path that
changes the password, but it definitely correct and does not harm.
Michael
2010-01-07 11:07:51 +01:00
Michael Adam
71e3de6c9f
s3:pdb_ldap:init_sam_from_ldap: untangle an assignment from the check
...
to enhance readability and denbuggability.
Michael
2010-01-07 11:07:51 +01:00
Björn Jacke
f5729dbb6e
s3:lib/time: remove TIME_T_MIN/MAX defines
...
we already get them from lib/util/time.h
2010-01-07 00:50:38 +01:00
Björn Jacke
b3e065e0c6
ѕ3:lib/time: replace make_dos_ and put_dos_ functions with those from lib/util/
2010-01-07 00:50:10 +01:00
Björn Jacke
c5f24c3eac
s3:lib/time: remoce null_mtime() - use null_time()
2010-01-07 00:49:57 +01:00
Björn Jacke
c1c7b6cecb
s3:lib/time: remove unused nt_time_equals
...
we have nt_time_equal doing the same in lib/util/
2010-01-07 00:49:49 +01:00
Jeremy Allison
d5995eec7e
Second part of the fix for bug #7020 - smbd using 2G memory.
...
There was a second leak in the processing of the out_data.frag
prs_struct. It needs freeing once the current pdu has been returned
asynchronously.
Jeremy.
2010-01-06 13:11:00 -08:00
Björn Jacke
e172b219ee
ѕ3:configure: use gettimeofday check from lib/util/
2010-01-06 18:28:16 +01:00
Björn Jacke
350db0bf25
vfs_commit: print warning when no fsync support is there
...
this one was part of an old patch from jpeach.
2010-01-06 18:28:16 +01:00
Jeremy Allison
f6bd654a6c
Fix bug #7020 - smbd using 2G memory.
...
When deferring an async pipe writeX and readX transfer
the outstanding request struct onto the conn struct. This
needs freeing after the packet is finally processed.
Jeremy.
2010-01-05 14:34:00 -08:00
Bo Yang
d06fb8e027
s3: List trusted domains from wcache when domain is offline.
...
Signed-off-by: Bo Yang <boyang@samba.org>
2010-01-06 19:19:52 +08:00
Bo Yang
133638c8ae
s3: Make winbindd_cache.c aware of domain offline to avoid unnecessary backend query.
...
Signed-off-by: Bo Yang <boyang@samba.org>
2010-01-06 19:19:43 +08:00
Bo Yang
36493bf2f6
s3: Fix infinite loop in NCACN_IP_TCP asa there is no timeout. Assume lsa_pipe_tcp is ok but network is down, then send request is ok, but select() on writeable fds loops forever since there is no response.
...
Signed-off-by: Bo Yang <boyang@samba.org>
2010-01-06 19:19:35 +08:00
Kai Blin
da41f23bda
s3 net: Fix up a share type translation and translate some more strings
2010-01-05 09:55:52 +01:00
Kai Blin
9a9d737070
s3 net: Add a few missing gettext calls.
...
Many many thanks to Adi Roiban from #ubuntu-translators for helping me find
and fix my problems with the translations.
2010-01-05 09:55:52 +01:00
Stefan Metzmacher
2ed51fbc4c
s3: Happy New Year 2010
...
metze
2010-01-04 08:42:03 +01:00
Volker Lendecke
283a73ca9f
s3: Trim down smbcontrol a bit
2010-01-03 21:14:58 +01:00
Volker Lendecke
ac5b090a41
s3: Fix a shadowed variable warning
2010-01-03 21:14:58 +01:00
Volker Lendecke
675d5fe981
s3: Fix an uninitialized variable warning
2010-01-03 21:14:58 +01:00
Volker Lendecke
37ac16a88f
s3: Convert cli_ulogoff to the async API
2010-01-03 21:14:57 +01:00
Volker Lendecke
99f292479f
s3: Convert cli_tdis to the async API
2010-01-03 21:14:57 +01:00
Volker Lendecke
41a5149981
s3: Slightly simplify winbindd_dual_ccache_ntlm_auth
...
data_blob_const can't fail
2010-01-03 11:38:22 +01:00
Volker Lendecke
e2f361d05e
s3: Fix some nonempty blank lines
2010-01-03 11:38:22 +01:00
Volker Lendecke
6edfbbd79b
s3: Remove some unused code
2010-01-03 11:38:22 +01:00
Volker Lendecke
2d75aa04da
s3: Convert cli_sesssetup_ntlmssp to the async API
2010-01-03 11:38:22 +01:00
Volker Lendecke
3f25fb5677
s3: NT_STATUS_MORE_PROCESSING_REQUIRED is a valid sesssetup return value
2010-01-03 11:38:22 +01:00
Volker Lendecke
a321dd91a4
s3: Convert cli_session_setup_kerberos to the async API
...
This is still cheated, acquiring the ticket is not async yet, but the SMB
part is
2010-01-03 11:38:22 +01:00
Volker Lendecke
063900ae63
s3: Fix a typo
2010-01-02 12:09:05 +01:00
Volker Lendecke
a66341b993
s3: simplify find_root_domain, find_our_domain() never fails
2010-01-02 12:09:05 +01:00
Volker Lendecke
133f023d58
s3: Use global_sid_Builtin in find_builtin_domain
2010-01-02 12:09:05 +01:00
Volker Lendecke
92345f49e3
s3: Avoid adding a domain twice
...
If we found a match with sid==NULL, we ended up adding the domain twice
2010-01-02 12:09:05 +01:00
Volker Lendecke
22a4a000ce
s3: Make free_domain_list() static
2010-01-02 12:09:05 +01:00
Volker Lendecke
583d192e47
s3: Adapt sid_dup_talloc to README.Coding
2010-01-02 12:09:05 +01:00
Volker Lendecke
d05e17f875
s3: Introduce domain_is_forest_root() helper function
...
Hopefully this makes the flag tests a bit more understandable
2010-01-02 12:09:05 +01:00
Jim McDonough
3a271a89b5
Prevent NULL dereference if group has no members
2009-12-30 15:06:07 -05:00