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

2722 Commits

Author SHA1 Message Date
Matthew Chapman
402ed18188 If a buffer pointer is NULL then its length_is() attribute should not be
transmitted.

Such a problem was crashing Server Manager.
0001-01-01 00:00:00 +00:00
Matthew Chapman
b9e8a3ef3a 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);
0001-01-01 00:00:00 +00:00
Matthew Chapman
1e17c2529c Ensuring return status is aligned in SAMR_QUERY_DISPINFO response. 0001-01-01 00:00:00 +00:00
Luke Leighton
fefb4bf191 added a "createuser" command. 0001-01-01 00:00:00 +00:00
Luke Leighton
d6cee14f80 value->enc_secret not value->secret 0001-01-01 00:00:00 +00:00
Luke Leighton
b51574174c const char* instead of char* for input 0001-01-01 00:00:00 +00:00
Luke Leighton
674e4a3a73 return type of nt_decrypt_string2 set to BOOL. 0001-01-01 00:00:00 +00:00
Luke Leighton
f9f594c03e going to start adding inter-domain trust logons soon. 0001-01-01 00:00:00 +00:00
Luke Leighton
96e358a2f0 valid_pol in lsa_query_secret() needed to be initialised to False. 0001-01-01 00:00:00 +00:00
Matthew Chapman
5951e16a11 querysecret now shows the real, fairdinkum, decrypted secret :-) 0001-01-01 00:00:00 +00:00
Matthew Chapman
f09388fa6f 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
534fe319d9 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
082109369b double-checked the return results from new querysecret command, corrected
my corrections :)
0001-01-01 00:00:00 +00:00
Luke Leighton
60da0a1255 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.
0001-01-01 00:00:00 +00:00
Matthew Chapman
113d03a38a 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.
0001-01-01 00:00:00 +00:00
Matthew Chapman
900238a661 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.
0001-01-01 00:00:00 +00:00
Matthew Chapman
365fa3b5fb 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
baf55934dc SAMLOGON query - alignment issue is beginning to get to me. 0001-01-01 00:00:00 +00:00
Luke Leighton
4bb74fcc71 Stefan Walters: purify spotted rverf should be alloc'd to 16 bytes not 8. 0001-01-01 00:00:00 +00:00
Luke Leighton
9d01e9d86a alignment issue for UDP SAMLOGON response. 0001-01-01 00:00:00 +00:00
Matthew Chapman
03e722cdf5 Added SVC_QUERY_DISP_NAME (corresponding to the GetServiceDisplayName API).
Needed during preliminary part of SAM replication.
0001-01-01 00:00:00 +00:00
Matthew Chapman
c95520eae9 Don't forget to make proto. 0001-01-01 00:00:00 +00:00
Luke Leighton
81b5304fe5 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. 0001-01-01 00:00:00 +00:00
Luke Leighton
5fa3a3f710 cli_setup_creds new arguments added. 0001-01-01 00:00:00 +00:00
Luke Leighton
65b0abe8b7 new "domtrust" test command. r&d into inter-domain trust accounts. 0001-01-01 00:00:00 +00:00
Luke Leighton
478d9ddfcf check for exactly _one_ key: for USRMGR.EXE. 0001-01-01 00:00:00 +00:00
Luke Leighton
5b1d078900 static password space needed. 0001-01-01 00:00:00 +00:00
Luke Leighton
d8946f1cc7 Greg Dickie: spotted bug where smb_nt_passwd could be NULL. 0001-01-01 00:00:00 +00:00
Luke Leighton
b0381bb262 Greg Dickie spotted some wierd memory corruption problem with group
database enumeration.
0001-01-01 00:00:00 +00:00
Luke Leighton
de290627f0 alignment issue in UDP SAMLOGON response. 0001-01-01 00:00:00 +00:00
Luke Leighton
62d499f832 mods to allow inter-domain trust accounts to be added to SAM database
using smbpasswd command.
0001-01-01 00:00:00 +00:00
Luke Leighton
74c7d626cd 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
a32a6f64b1 oops, IS_BITS_CLR_ALL() macro was wrong! 0001-01-01 00:00:00 +00:00
Luke Leighton
97a0b24955 reverted access control flags in enum commands. 0001-01-01 00:00:00 +00:00
Luke Leighton
1c330d5682 - 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
073c8652c1 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
e0b5a866ce oops, accidentally committed clear-text password reading last week. 0001-01-01 00:00:00 +00:00
Luke Leighton
188d9a75ed Bejamin Kuit. #define MYSQL and MYSQL_ROW to void iff <mysql.h> not found. 0001-01-01 00:00:00 +00:00
Luke Leighton
167b0b20e3 spelling mistake, #ifdef'd out for non-developers (oops!) 0001-01-01 00:00:00 +00:00
Luke Leighton
4e89fbb7d9 oops, put -DDEBUG_PASSWORD in wrong place. 0001-01-01 00:00:00 +00:00
Luke Leighton
eb63fbdb68 Benjamin Kuit's mods. 0001-01-01 00:00:00 +00:00
Luke Leighton
d59a2e669a Benjamin Kuit's latest mysql mods. issue with "make proto" needs to be
resolved.
0001-01-01 00:00:00 +00:00
Luke Leighton
511ef8a58c added <mysql.h> autoconf test. 0001-01-01 00:00:00 +00:00
Luke Leighton
fdf61e1dab Benjamin Kuit's MYSQL SAM Database implementation.
Copyright (C) Benjamin Kuit <bj@mcs.uts.edu.au> 1999.
0001-01-01 00:00:00 +00:00
Luke Leighton
8b859797aa improving syntax / useability of rpcclient "shutdown" command:
rpcclient [-m messsage] [-t timeout] [-r or --reboot].
0001-01-01 00:00:00 +00:00
Gerald Carter
644cda5d80 referred reader to NT Domain FAQ for more info (copy of update to 2.0) 0001-01-01 00:00:00 +00:00
Matthew Chapman
cb5428308d Return either STATUS_BUFFER_OVERFLOW or ERRDOS/ERRmoredata depending on
whether the client supports 32-bit error codes.
0001-01-01 00:00:00 +00:00
Matthew Chapman
d1cc33bcb6 Added "lookupdomain" rpcclient command. Not particularly useful currently
(you can do "lookupdomain MYDOMAIN" and "lookupdomain BUILTIN" and the
results won't be too surprising), but it will come in useful testing the
new password database code I'm working on.
0001-01-01 00:00:00 +00:00
Matthew Chapman
7d03e6e219 Win9x user level security.
* Added SAMR_LOOKUP_DOMAIN (-> SamrLookupDomainInSamServer)

* Added real SAMR_ENUM_DOM_GROUPS (corresponding to
SamrEnumerateGroupsInDomain). The existing one is just an alias for
SamrQueryDisplayInformation (see below).

* Added three extra info levels to SAMR_QUERY_DISPINFO. Info level 3 is
what was previously SAMR_ENUM_DOM_GROUPS; info levels 4 and 5 are
simple user/group list requests used by Win9x and I suspect (haven't
checked) the "low speed connection" User Manager.

* Added another two aliases for SAMR_QUERY_DISPINFO, opcodes 0x30 and
0x33. Usually the first is with info level 3 and the second 4 but there is
some overlap so indeed these should be implemented as just aliases.

* Return ERRDOS/ERRmoredata on extra data instead of
STATUS_BUFFER_OVERFLOW for Win95's benefit. On a named pipe this results
in an SMBreadX as usual.

Still need to fix SAMR_QUERY_DOMAIN_INFO which has a hard-coded number of
users and groups - which Win95 proceeds to truncate at.
0001-01-01 00:00:00 +00:00
Luke Leighton
ec1b7000fd added jeremy's new c++-like code for parsing of security descriptors. 0001-01-01 00:00:00 +00:00