1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
Commit Graph

26363 Commits

Author SHA1 Message Date
Volker Lendecke
ff211be696 Remove "pipe_handle_offset" -- pipes now use "struct files_struct" 2008-10-25 12:09:58 +02:00
Derrell Lipman
2a76f4d8c8 Error return is False, not -1
- There were a few places in SMBC_getatr() that returned -1 instead of a
  boolean.  -1 was intended to mean error, but that's what False is for, and
  the usages of this function assume that it returns a boolean with False as
  the error condition.

Derrell
2008-10-24 10:31:31 -04:00
Jelmer Vernooij
ea474647f8 Revert Samba3 back to using its own charset handling code. 2008-10-24 16:05:15 +02:00
Jelmer Vernooij
56a0b035c6 Remove more uses of global_loadparm. 2008-10-24 14:31:16 +02:00
Jelmer Vernooij
2cabbb2eeb Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-10-24 04:19:08 +02:00
Jelmer Vernooij
9d679c9a67 Fix merged build paths. 2008-10-24 04:18:47 +02:00
Tim Prouty
0058176ae3 s3: fix simple "incompatible pointer type" build warning 2008-10-23 16:38:19 -07:00
Tim Prouty
1b42152454 Fix "ndr_size_PAC_LOGON_INFO defined but not used" build warning
This patch removes the gensize option from krb5pac.idl because it
generates an unused function that has been causing warnings during the
s3 build.  I re-ran 'make samba3-idl' to update the generated files
for s3.  For s4 I ran a full build with no problems.
2008-10-23 15:13:54 -07:00
Günther Deschner
0bfbae0f50 netapi: make sure to always cleanup after testing NetUser calls.
Guenther
2008-10-24 00:06:43 +02:00
Günther Deschner
d27bc7377a netapi: add more group tests to netapitest.
Guenther
2008-10-24 00:06:33 +02:00
Günther Deschner
3971492301 s3-samr-server: return NT_STATUS_NOT_SUPPORTED for group rename.
Guenther
2008-10-24 00:06:24 +02:00
Günther Deschner
2b364550a9 s3-samr-server: remove unused historic code.
Guenther
2008-10-24 00:06:16 +02:00
Günther Deschner
78a85f9e96 svcctl: move some non-rpc related bits out of rpc_svcctl.h.
Guenther
2008-10-24 00:06:07 +02:00
Jelmer Vernooij
ce0ac322b4 Fix prototype for set_sockaddr_port. 2008-10-23 23:20:50 +02:00
Jelmer Vernooij
f18296151d Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-10-23 21:59:15 +02:00
Tim Prouty
0b68762af7 Fix "parameter has incomplete type" build warning.
When libcli-util was moved to the top level
(3be0f6ea56) it introduced a build
warning.  Since ndr_map_error2ntstatus depends on the definition of
enum ndr_err_code and libndr.h can't be easily included in error.h, I
moved the definition of enum ndr_err_code to libndr.h.

This also eliminates the need for the duplicate definition in proto.h
2008-10-23 12:21:44 -07:00
Jelmer Vernooij
22f566c39b Move set_sockaddr_port to libutil. 2008-10-23 21:08:13 +02:00
Jelmer Vernooij
7577d9ebf0 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-10-23 20:42:30 +02:00
Jelmer Vernooij
fe36fe8c3e Use common net utility code (address and sockaddr manipulation). 2008-10-23 20:41:15 +02:00
Günther Deschner
27c4cf4e7b s3-build: add missing generated svcctl changes.
Guenther
2008-10-23 20:00:03 +02:00
Jelmer Vernooij
d6a5476ee7 Use sockaddr_storage only where we rely on the size, use sockaddr
otherwise (to clarify we can also pass in structs smaller than
sockaddr_storage, such as sockaddr_in).
2008-10-23 19:53:15 +02:00
Jelmer Vernooij
c17898db4e Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-10-23 18:50:34 +02:00
Jelmer Vernooij
81fabeff2d Use libutil genrand. 2008-10-23 18:46:35 +02:00
Günther Deschner
f36ffa7681 s3-build: remove duplicate svcctl bits and re-run make samba3-idl.
Guenther
2008-10-23 18:34:57 +02:00
Jelmer Vernooij
d805c714bb Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-10-23 17:51:30 +02:00
Volker Lendecke
097f40249c Make use of a large buffer for smbclient put command 2008-10-23 17:46:00 +02:00
Jelmer Vernooij
cf659fa4fe Import talloc_stack into util library. 2008-10-23 17:27:30 +02:00
Jelmer Vernooij
db65c3374a Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-10-23 17:12:16 +02:00
Jelmer Vernooij
5b5e36085a Share codepages. 2008-10-23 16:58:11 +02:00
Jelmer Vernooij
f9fb9436ae Use WERR_FILE_EXISTS which is the equivalent of WERR_ALREADY_EXISTS
previously present in Samba 3.
2008-10-23 15:37:39 +02:00
Jelmer Vernooij
44b728958a Use common error definitions. 2008-10-23 15:35:21 +02:00
Günther Deschner
8a3bff343a s3-build: fix another build warning with the new ASN1 code.
Guenther
2008-10-23 11:46:18 +02:00
Günther Deschner
b7c38abe27 netapi: fix add_GROUP_USERS_INFO_X_buffer.
Guenther
2008-10-23 11:46:18 +02:00
Günther Deschner
fafa608441 netapi: fix NetUserGetGroups_r returning partial results.
Guenther
2008-10-23 11:46:18 +02:00
Günther Deschner
6e058e5977 s3-samr-server: unify callback convention: _samr_UserSetInfo.
Guenther
2008-10-23 11:46:18 +02:00
Günther Deschner
3566efede2 s3-samr-server: unify callback convention: _samr_QueryDomainInfo.
Guenther
2008-10-23 11:46:18 +02:00
Günther Deschner
29737ab5da s3-samr-server: fix return code in _samr_QueryDisplayInformation.
Guenther
2008-10-23 11:46:18 +02:00
Jelmer Vernooij
60164e9002 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-10-23 04:58:08 +02:00
Jelmer Vernooij
52923c4ff4 Remove unused copy of tables.pl 2008-10-23 03:07:27 +02:00
Jelmer Vernooij
ad50d78496 Remove unused copy of ndrdump.c. 2008-10-23 03:04:48 +02:00
Günther Deschner
d115c4587f s3-build: fix some const build warnings.
Guenther
2008-10-23 01:43:41 +02:00
Günther Deschner
c017909e2e netapi: NetGroupEnum_r needs to handle servers with no groups.
Guenther
2008-10-23 01:43:06 +02:00
Günther Deschner
74a9a391aa s3-samr-server: _samr_DeleteUser needs to wipe out the user_handle on success.
Guenther
2008-10-23 01:42:27 +02:00
Günther Deschner
f9c6313e66 s3-samr-server: fix access check in _samr_QuerySecurity().
Guenther
2008-10-22 23:17:02 +02:00
Günther Deschner
0f89871837 s3-build: fix the build.
Guenther
2008-10-22 22:45:04 +02:00
Jeremy Allison
f53578daf4 Fix net rpc vampire, based on an *amazing* piece of debugging work by "Cooper S. Blake" <the_analogkid@yahoo.com>.
"I believe I have found two bugs in the 3.2 code and one bug that
carried on to the 3.3 branch.  In the 3.2 code, everything is
located in the utils/net_rpc_samsync.c file.  What I believe is the
first problem is that fetch_database() is calling
samsync_fix_delta_array() with rid_crypt set to true, which means
the password hashes are unencrypted from the RID encryption.
However, I believe this call is redundant, and the corresponding
call for samdump has rid_crypt set to false.  So I think the
rid_crypt param should be false in fetch_database().

If you follow the code, it makes its way to sam_account_from_delta()
where the password hashes are decrypted a second time by calling
sam_pwd_hash().  I believe this is what is scrambling my passwords.

These methods were refactored somewhere in the 3.3 branch.  Now the
net_rpc_samsync.c class calls rpc_vampire_internals, which calls
libnet/libnet_samsync.c, which calls samsync_fix_delta_array() with
rid_crypt always set to false.  I think that's correct.  But the
second bug has carried through in the sam_account_from_delta()
function:

 208         if (memcmp(r->ntpassword.hash, zero_buf, 16) != 0) {
 209                 sam_pwd_hash(r->rid, r->ntpassword.hash, lm_passwd, 0);
 210                 pdb_set_lanman_passwd(account, lm_passwd, PDB_CHANGED);
 211         }
 212
 213         if (memcmp(r->lmpassword.hash, zero_buf, 16) != 0) {
 214                 sam_pwd_hash(r->rid, r->lmpassword.hash, nt_passwd, 0);
 215                 pdb_set_nt_passwd(account, nt_passwd, PDB_CHANGED);

If you look closely you'll see that the nt hash is going into the
lm_passwd variable and the decrypted value is being set in the lanman
hash, and the lanman hash is being decrypted and put into the nt hash
field.  So the LanMan and NT hashes look like they're being put in
the opposite fields."

Fix this by removing the rid_crypt parameter.
Jeremy.
2008-10-22 13:21:23 -07:00
Günther Deschner
c0cf457c85 s3-asn1: make all of s3 asn1 code do a proper asn1_init() first.
Guenther
2008-10-22 21:37:36 +02:00
Günther Deschner
527d797476 s3-asn1/spnego: use OIDs including dots.
Guenther
2008-10-22 21:37:36 +02:00
Günther Deschner
d9f1fff5b3 s3: use shared asn1 code.
Guenther
2008-10-22 21:37:36 +02:00
Günther Deschner
cef97c2459 s3-spnego: move spnego defines to spnego.h
Guenther
2008-10-22 21:37:36 +02:00