1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00

912 Commits

Author SHA1 Message Date
Tim Potter
6998bdbfa8 Added struct vfs_ops describing virtual filesystem operations.
Created constants for pstring and fstring lengths.
-
Andrew Tridgell
cae71af453 new files needed by profiling code -
Andrew Tridgell
ef3d61a80a Ken McDonell from SGI was interested in adding some profiling
capabilities to Samba so that Samba could talk to the SGI PCP
(Performance Co-Pilot) apps.

This change adds a profiling shared memory area and uses it to count
two fairly trivial things, the number of uid switches and the number
of SMB packets processes. To add more just edit include/profile.h and
then increment it at the right place.

I've also added a -P switch to smbstatus to dump the profile area.
-
Luke Leighton
ac070dfd39 added SamrQueryDomainInfo call info level 0x3 for kix32.exe support -
Luke Leighton
f5f61bd477 "User Manager" - create user + change password now work.
next problem: user group adding not supported so an "access denied"
message is reported instead of "ok" when a new user is created.
-
Luke Leighton
129a9a4d4b fixed issues with "Welcome to SAMBA Domain" for when admin user/pass is
used to add workstation to domain.  unix account db not modified: only
SAM password db is used.
-
Luke Leighton
4aed18b5e1 added SAMR_USER_INFO_24 info level to samr_set_userinfo. this is used
by "Welcome to SAMBA Domain".
-
Luke Leighton
2e58ed7424 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.
-
Luke Leighton
f84dede27e removed 2 unnecessary args from make_uni_hdr. -
Matthew Chapman
6d03f61d25 Fixed LSA Lookup Names. There were a few too many NULL pointers in a
negative response, which tended to crash lsass.exe.
-
Luke Leighton
103557e26b dynamic memory allocation in samr enum dom users. works with 849 entries now. -
Matthew Chapman
73730f6004 Another UNICODE issue - this time BUFFER2 was being transmitted incorrectly. -
Luke Leighton
fefb4bf191 added a "createuser" command. -
Luke Leighton
674e4a3a73 return type of nt_decrypt_string2 set to BOOL. -
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.
-
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.
-
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.
-
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.
-
Luke Leighton
4bb74fcc71 Stefan Walters: purify spotted rverf should be alloc'd to 16 bytes not 8. -
Matthew Chapman
03e722cdf5 Added SVC_QUERY_DISP_NAME (corresponding to the GetServiceDisplayName API).
Needed during preliminary part of SAM replication.
-
Matthew Chapman
c95520eae9 Don't forget to make proto. -
Luke Leighton
65b0abe8b7 new "domtrust" test command. r&d into inter-domain trust accounts. -
Luke Leighton
62d499f832 mods to allow inter-domain trust accounts to be added to SAM database
using smbpasswd command.
-
Luke Leighton
a32a6f64b1 oops, IS_BITS_CLR_ALL() macro was wrong! -
Luke Leighton
188d9a75ed Bejamin Kuit. #define MYSQL and MYSQL_ROW to void iff <mysql.h> not found. -
Luke Leighton
eb63fbdb68 Benjamin Kuit's mods. -
Luke Leighton
511ef8a58c added <mysql.h> autoconf test. -
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.
-
Luke Leighton
ec1b7000fd added jeremy's new c++-like code for parsing of security descriptors. -
Luke Leighton
59f081069a rpcclient shutdown command -
Luke Leighton
98ecb88704 const issues with byte mod / byte read macros. -
Matthew Chapman
a1d39af1ce UNICODE cleanup (see lib/util_unistr.c).
No more ugly static library buffers and all functions take a destination
string length (especially unistrcpy was rather dangerous; we were only
saved by the fact that datagrams are limited in size).
-
Luke Leighton
6a437cfb33 UNICODE issues. -
Luke Leighton
73db80f341 the UNICODE issue... -
Luke Leighton
c5109ff782 use jeremy's versions of the UNICODE routines. -
Luke Leighton
ac72fe1ab3 removal of the use of unistrn2 function: replace it with unistr2_to_str
which is more appropriate.
-
Luke Leighton
9084b7e33d UNICODE byte ordering issue: typecast to uint16* replaced with SSVAL() -
Luke Leighton
d455c9d2c9 iteration of sam passwd entries was an order n-cubed algorithm due
to resolution of unix name to nt name being unnecessarily _inside_
another loop.
-
Luke Leighton
5b9a7278da corrections to get data stream for 2nd and subsequent pdus copied from
right place (forgot to subtract 0x18 header bytes)
-
Luke Leighton
f7dfa55a2e cache unix groups so that two-level getgrent calls don't occur. -
Luke Leighton
f082f07e76 multiple dce/rpc PDUs failed to work after ntlmssp update was added. -
Luke Leighton
ce1ae86cbd comma after DOM_MAP_USER removed -
Matthew Chapman
e1e3875057 Added init_nt_time function which initialises an NTTIME to -1. -
Luke Leighton
ad58cdfac6 fix for enumerate domain users (bug spotted by sean matthews).
also needed to use start index properly and generate next index.

both client and server code need to recognise error code 0x105
when there's not enough room to store all the users in one call.

sort this out another time.
-
Luke Leighton
a022710f1e rpcclient "Service Control Manager" svcenum [-i] command. -
Luke Leighton
f4dd8f6b56 Service Control Manager - service enumeration. -
Luke Leighton
0ed70972d7 set_port warning / unused / global/local variable overlap issues
cmd_svcctl.c tests got put into cvs by mistake.
-
Richard Sharpe
f6c7819266 Putting back the -p flag in smbclient.
However, it seems that the -s flag
in smbclient is also ignored :-(
-
Matthew Chapman
91c77f5432 Finally committing my LDAP changes.
* Added new APIs for modifying groups.
* RIDs are allocated similarly to NT, starting from 1000 and incrementing by 1
  for each new user/group.
* RIDs are now consistently in hex

* Fixed bugs reported by Allan Bjorklund <allan@umich.edu>:
   - ldap_close_connection is exported by OpenLDAP - changed to ldap_disconnect
   - Missing ldap_connect() in getusergroups functions
   - ldap_next_entry was being called too early while retrieving a sam_struct
   - LDAP globals should be extern in sampassldap.c

* Fixed bugs reported by Martin Hofbauer <mh@bacher.at>
   - Newly added workstation trust accounts had attributes DU rather than W.
   - User dn's were forced to start with "uid=XX" rather than using the existing
     dn.
-
Luke Leighton
a15a3f95f2 fix for potential lsass.exe crashing due to negative response from
LsaLookupNames being incorrect.  this is a bit wierd: why would the
lsass.exe on the nt _client_ crash due to an LsaLookupNames response
from a samba _server_?
-