1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-19 10:03:58 +03:00

2934 Commits

Author SHA1 Message Date
Luke Leighton
fa01e8764c added SAMR_USER_INFO_24 info level to samr_set_userinfo. this is used
by "Welcome to SAMBA Domain".
(This used to be commit 4aed18b5e1e2309c0f6931fbfdd604b01cb9498a)
1999-03-25 15:14:30 +00:00
Luke Leighton
43a460075a SAM database "set user info".
----------------------------

- removed DOM_RID4

- removed SAMR_UNKNOWN_32

- added SAMR_SET_USERINFO (opcode 0x32)

- added level 0x1 to SAMR_QUERY_DOM_INFO (needed for create user)

- fixed pwdb_gethexpwd() it was failing on XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

- added mod_sam21pwd_entry()

- preparing to call mod_sam21pwd_entry()

- added "user session key" to user_struct.dc.  this is md4(nt#) and is
  needed to decode user's clear-text passwords in SAMR_SET_USERINFO.

- split code out in chgpasswd.c to decode 516 byte password buffers.
(This used to be commit 2e58ed742435befe419aa366c4052019fede8c23)
1999-03-25 13:54:31 +00:00
Luke Leighton
1ad002b749 NULL pointer handling in nt_lm_owf_gen
(This used to be commit 68841eeb64df5958a90a6471fd17e6e56fba7c67)
1999-03-24 21:23:39 +00:00
Luke Leighton
d4de2b0ae3 matt, you had removed a "pointer" from DOM_R_REF structure which made it
possible to fix lsa_r_lookup_names, but forgot to add that pointer in
to lsa_r_lookup_sids, where DOM_R_REF was also being used.
(This used to be commit 9092368af8adbf412c71af7216365e926593d54d)
1999-03-24 21:09:34 +00:00
Luke Leighton
cd7c530f56 removed 2 unnecessary args from make_uni_hdr.
(This used to be commit f84dede27e16a5f02ee6d02fe2d16f2661c65470)
1999-03-24 17:26:08 +00:00
Matthew Chapman
22ab15823f Fixed LSA Lookup Names. There were a few too many NULL pointers in a
negative response, which tended to crash lsass.exe.
(This used to be commit 6d03f61d2536630968007958345cf44a42b03584)
1999-03-24 12:18:28 +00:00
Luke Leighton
6b9cb3a254 dynamic memory allocation in samr enum dom users. works with 849 entries now.
(This used to be commit 103557e26b071bf1e65e025ef5a52ccdbf483d02)
1999-03-23 20:43:44 +00:00
Matthew Chapman
877db70926 Fixed a typo where the RPC header mem_buffer was initialised as 0x8 bytes long
rather than 0x18. Rather nasty, I doubt the client ever worked for multiple
PDU's.
(This used to be commit 90b6fce780c8dff37a389493be0568923b189ff0)
1999-03-23 15:01:37 +00:00
Matthew Chapman
99020c9b09 ERRmoredata is informational and should not be treated as a hard error
anywhere.
(This used to be commit 71b861f7468d7950bedb61dd18a4b9d830bf8628)
1999-03-23 14:58:26 +00:00
Matthew Chapman
f7f718911b Same infinite loop bug as I fixed in SAMBA_2_0, but I just spent half
an hour tracking it down in HEAD so I'm going to commit it here as well.
(This used to be commit 9a482aedb2c4eb7439e2edc092642d315d2a595b)
1999-03-23 14:56:25 +00:00
Matthew Chapman
3fa7f643f2 #if defined(HAVE_MYSQL_H) || defined(WITH_MYSQLSAM)
should instead have &&.
(This used to be commit 1143fd4297b946d4ffd3c6ca104188cdcb48fac8)
1999-03-23 14:14:12 +00:00
Matthew Chapman
803100197b Another UNICODE issue - this time BUFFER2 was being transmitted incorrectly.
(This used to be commit 73730f6004c7eca1d852a569dede94095a396dca)
1999-03-23 13:45:42 +00:00
Matthew Chapman
5380636c4e If a buffer pointer is NULL then its length_is() attribute should not be
transmitted.

Such a problem was crashing Server Manager.
(This used to be commit 402ed18188dd058ebed2ffc2af9840c04533dc8f)
1999-03-23 02:31:34 +00:00
Matthew Chapman
a4bc522a72 The line:
this_pdu_data_pos = data_pos - p->prev_pdu_file_offset;

is correct for first two PDU's only, after that it results in extra
garbage after each fragment and hence "Protocol Error" messages from
NT4 SP4. Changed to:

    this_pdu_data_pos = (pdu_data_sent == 0) ? 0 : (pdu_data_sent - 0x18);
(This used to be commit b9e8a3ef3a25a81c4bb125bdd4f4d8334a578c85)
1999-03-21 13:01:31 +00:00
Matthew Chapman
2a34b224b8 Ensuring return status is aligned in SAMR_QUERY_DISPINFO response.
(This used to be commit 1e17c2529c5162ea79fe2331ca2162ffb98bd6c2)
1999-03-21 12:55:18 +00:00
Luke Leighton
da4cd4f5a9 added a "createuser" command.
(This used to be commit fefb4bf19181714cb73414febd6ee2ec10356cbe)
1999-03-19 21:20:19 +00:00
Luke Leighton
19e22bc8b6 value->enc_secret not value->secret
(This used to be commit d6cee14f8049471b14337681cbeac115958fbac0)
1999-03-19 21:15:03 +00:00
Luke Leighton
5aeb58c285 const char* instead of char* for input
(This used to be commit b51574174c5bbc554eb1c697cb22b2b73af44306)
1999-03-19 20:58:24 +00:00
Luke Leighton
7a3e8ad097 return type of nt_decrypt_string2 set to BOOL.
(This used to be commit 674e4a3a73cd601c647a5069e2af943a6321ac06)
1999-03-19 20:26:25 +00:00
Luke Leighton
bd76e02ec4 going to start adding inter-domain trust logons soon.
(This used to be commit f9f594c03e220a0d902c5c3c5835948348b19fee)
1999-03-19 15:49:22 +00:00
Luke Leighton
f19e894577 valid_pol in lsa_query_secret() needed to be initialised to False.
(This used to be commit 96e358a2f00ac603c95bc922e488ea2b64aeb829)
1999-03-19 15:39:43 +00:00
Matthew Chapman
55bce9e30e querysecret now shows the real, fairdinkum, decrypted secret :-)
(This used to be commit 5951e16a1134a559abefdd400e7a17627338f368)
1999-03-19 15:11:07 +00:00
Matthew Chapman
b5a5236f20 Implemented encryption algorithm used for a number of RPC buffers.
(actually, decryption only currently because I need to get some sleep).

Basically another Microsoft twist on DES; the "master key" is the user's
NT hash MD4'd and subsets of this are chosen as the 56-bit DES keys.
(This used to be commit f09388fa6f41a13ca035b5b2ff40be804608f619)
1999-03-19 15:09:25 +00:00
Luke Leighton
fda194255c Beau Kuiper: provided patch so that passwords could only be changed by
root if the ACB_PWLOCK bit is set (on a per-user basis).  he also added
an extra smbpasswd option so that this bit can be modified from
command-line.
(This used to be commit 534fe319d9de8da2ed7e911dbba3c7df08193efa)
1999-03-19 05:00:39 +00:00
Luke Leighton
6cc71c5354 double-checked the return results from new querysecret command, corrected
my corrections :)
(This used to be commit 082109369b981713f68c13053b6419686f69ef26)
1999-03-18 22:13:15 +00:00
Luke Leighton
60d632173b matt,
remember: only close handles that you've previously opened.  if the
lsa_open_secret() succeeds then and only then can you close it.
if the lsa_open_policy2() succeeds then and only then can you close it.
(This used to be commit 60da0a12555a2e12e27ff2af24e1068a515469c0)
1999-03-18 22:12:05 +00:00
Matthew Chapman
f7eaf17216 Added SVC_START_SERVICE rpc. An NT PDC will attempt to start the NETLOGON
service on its BDC's prior to initiating SAM replication. For now just
return success.
(This used to be commit 113d03a38a34e5c4115dab59349078093bcd4888)
1999-03-18 09:36:43 +00:00
Matthew Chapman
eb82f27bd1 Changed hard-coded number of users/groups in SAMR_QUERY_DOMAIN_INFO
to MAX_SAM_ENTRIES to prevent truncation of user lists.
A proper implementation is not important right now.
(This used to be commit 900238a66153c276d63780e3264651089291d185)
1999-03-18 06:30:27 +00:00
Matthew Chapman
e8ac69c168 Adding LSA_OPENSECRET (-> LsarOpenSecret) and LSA_QUERYSECRET
(-> LsarQuerySecret) on client side, including rpcclient command
"querysecret" for others to play with.

The major obstacle is working out the encryption algorithm used
for the secret value. It definitely uses the NT hash as part of the
key, and it seems the block size is 64 bits - probably DES based -
but I can't work out what's done in between. Help required.
(This used to be commit 365fa3b5fbf551670acc91f593138a7e91a5f7fa)
1999-03-18 05:16:59 +00:00
Luke Leighton
5a6db490ea SAMLOGON query - alignment issue is beginning to get to me.
(This used to be commit baf55934dc5118f8c423fe05c0e4b8d7c018fa14)
1999-03-17 21:35:10 +00:00
Luke Leighton
7f02de406d Stefan Walters: purify spotted rverf should be alloc'd to 16 bytes not 8.
(This used to be commit 4bb74fcc714fccac791ce86c8882d19d704b17a1)
1999-03-17 19:49:14 +00:00
Luke Leighton
7f913623be alignment issue for UDP SAMLOGON response.
(This used to be commit 9d01e9d86a8d22a283a8377a12bb175398547d78)
1999-03-17 19:48:29 +00:00
Matthew Chapman
517aade8bd Added SVC_QUERY_DISP_NAME (corresponding to the GetServiceDisplayName API).
Needed during preliminary part of SAM replication.
(This used to be commit 03e722cdf502491d09d4c5eb9024d837ae10ab32)
1999-03-16 06:24:24 +00:00
Matthew Chapman
a6fa61afd2 Don't forget to make proto.
(This used to be commit c95520eae9eecc2ec0a347dc0212d6983c5c7f2c)
1999-03-14 01:25:11 +00:00
Luke Leighton
f37d96a8c0 Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.Stefan Walter: spotted *p_group == NULL which should be p_group == NULL.
(This used to be commit 81b5304fe5ea518680b2516e2da39f31c1d05afb)
1999-03-12 19:53:28 +00:00
Luke Leighton
c4241b5662 cli_setup_creds new arguments added.
(This used to be commit 5fa3a3f710cfd3a51641d560a96bd08f92afca32)
1999-03-12 19:37:40 +00:00
Luke Leighton
6e88171bac new "domtrust" test command. r&d into inter-domain trust accounts.
(This used to be commit 65b0abe8b7594ff6c662da86dc2e35bd83a2d13d)
1999-03-12 05:47:06 +00:00
Luke Leighton
0aaf5a368c check for exactly _one_ key: for USRMGR.EXE.
(This used to be commit 478d9ddfcf59e3d847d83947c8d4f0bf84f26833)
1999-03-12 05:46:10 +00:00
Luke Leighton
6a4239c8b0 static password space needed.
(This used to be commit 5b1d0789007bfcb09326643eb271746cee386846)
1999-03-10 17:32:41 +00:00
Luke Leighton
2aadefe8cc Greg Dickie: spotted bug where smb_nt_passwd could be NULL.
(This used to be commit d8946f1cc7b77b06f346344ffdb4772e6d225396)
1999-03-10 17:06:07 +00:00
Luke Leighton
a18c6ba9a4 Greg Dickie spotted some wierd memory corruption problem with group
database enumeration.
(This used to be commit b0381bb262f51fca916fb951fc0c7e54a58e2dd3)
1999-03-09 23:22:36 +00:00
Luke Leighton
60bfe3819e alignment issue in UDP SAMLOGON response.
(This used to be commit de290627f06915d420d37d2a3ac2f736c4cf8d74)
1999-03-09 02:03:39 +00:00
Luke Leighton
a3c6e96a22 mods to allow inter-domain trust accounts to be added to SAM database
using smbpasswd command.
(This used to be commit 62d499f83256c6e8b3308dc4bd8e9f5df873b14b)
1999-03-09 01:21:57 +00:00
Luke Leighton
aecbc5b5d3 oh dear, it's this one again. removed check for MAILSLOT\NTLOGON because
it's wrong.  i've seen a packet from nt client on MAILSLOT\NETLOGON
with appended undocumented unicode tacked on the end and the response
contained undocumented unicode tacked on the end.
(This used to be commit 74c7d626cd85189c902489d220c3eca30a4b1bb1)
1999-03-09 01:20:08 +00:00
Luke Leighton
5db005007a oops, IS_BITS_CLR_ALL() macro was wrong!
(This used to be commit a32a6f64b187e82f88eaccb6a2a88902be5cc4e0)
1999-03-09 01:17:42 +00:00
Luke Leighton
b6db424576 reverted access control flags in enum commands.
(This used to be commit 97a0b24955b45e434e34510f65afdde7bfdf3183)
1999-03-09 01:17:16 +00:00
Luke Leighton
8cf03d5a39 - todd sabin spotted bugs in samr enum dom users / groups / aliases code:
last count (probably an ENUM / resume handle) should always be returned
  even if there are no items being returned.

- got fed up of seven intendation levels in cmd_samr.c, maximum recommended
  in *any* code is three!  made some sub-fns instead.
(This used to be commit 1c330d568225759950401cfb98fe9e99db81419c)
1999-03-08 19:19:01 +00:00
Luke Leighton
269f11bfa9 pass_check.c could receive encrypted password: printing it out as a %s
results in garbage.  with no password length argument doing dump_data(
100, password, strlen(password)) is the next best alternative.
(This used to be commit 073c8652c13408b883fc73203e5558b1a9a64d62)
1999-03-08 18:43:50 +00:00
Luke Leighton
76ebe05c18 oops, accidentally committed clear-text password reading last week.
(This used to be commit e0b5a866ce2628a5e152af3ef817ee3124e60500)
1999-03-08 18:42:43 +00:00
Luke Leighton
26c08067f0 Bejamin Kuit. #define MYSQL and MYSQL_ROW to void iff <mysql.h> not found.
(This used to be commit 188d9a75edb41e8a0cc0ea6e17c9497771cf3b96)
1999-03-08 18:41:58 +00:00