1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00
Commit Graph

551 Commits

Author SHA1 Message Date
Luke Leighton
6ce4aaad2b added SamrQueryDomainInfo call info level 0x3 for kix32.exe support
(This used to be commit ac070dfd39)
1999-03-29 17:24:46 +00:00
Luke Leighton
068e77c861 "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.
(This used to be commit f5f61bd477)
1999-03-25 21:32:04 +00:00
Luke Leighton
3b07eff9ea 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.
(This used to be commit 129a9a4d4b)
1999-03-25 20:56:28 +00:00
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 4aed18b5e1)
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 2e58ed7424)
1999-03-25 13:54:31 +00:00
Luke Leighton
cd7c530f56 removed 2 unnecessary args from make_uni_hdr.
(This used to be commit f84dede27e)
1999-03-24 17:26:08 +00:00
Matthew Chapman
803100197b Another UNICODE issue - this time BUFFER2 was being transmitted incorrectly.
(This used to be commit 73730f6004)
1999-03-23 13:45:42 +00:00
Luke Leighton
da4cd4f5a9 added a "createuser" command.
(This used to be commit fefb4bf191)
1999-03-19 21:20:19 +00:00
Luke Leighton
7a3e8ad097 return type of nt_decrypt_string2 set to BOOL.
(This used to be commit 674e4a3a73)
1999-03-19 20:26:25 +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 f09388fa6f)
1999-03-19 15:09:25 +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 113d03a38a)
1999-03-18 09:36:43 +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 365fa3b5fb)
1999-03-18 05:16:59 +00:00
Luke Leighton
7f02de406d Stefan Walters: purify spotted rverf should be alloc'd to 16 bytes not 8.
(This used to be commit 4bb74fcc71)
1999-03-17 19:49:14 +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 03e722cdf5)
1999-03-16 06:24:24 +00:00
Matthew Chapman
a6fa61afd2 Don't forget to make proto.
(This used to be commit c95520eae9)
1999-03-14 01:25:11 +00:00
Luke Leighton
6e88171bac new "domtrust" test command. r&d into inter-domain trust accounts.
(This used to be commit 65b0abe8b7)
1999-03-12 05:47:06 +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 62d499f832)
1999-03-09 01:21:57 +00:00
Luke Leighton
26c08067f0 Bejamin Kuit. #define MYSQL and MYSQL_ROW to void iff <mysql.h> not found.
(This used to be commit 188d9a75ed)
1999-03-08 18:41:58 +00:00
Luke Leighton
caa34b37e4 Benjamin Kuit's mods.
(This used to be commit eb63fbdb68)
1999-03-05 22:03:04 +00:00
Matthew Chapman
05f772b431 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.
(This used to be commit 7d03e6e219)
1999-02-24 01:52:30 +00:00
Luke Leighton
1e71ecdcb2 added jeremy's new c++-like code for parsing of security descriptors.
(This used to be commit ec1b7000fd)
1999-02-23 22:39:54 +00:00
Luke Leighton
52fb07aea2 rpcclient shutdown command
(This used to be commit 59f081069a)
1999-02-16 18:04:21 +00:00
Matthew Chapman
fd96929ec1 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).
(This used to be commit a1d39af1ce)
1999-02-12 00:16:09 +00:00
Luke Leighton
f38bfc7d9a UNICODE issues.
(This used to be commit 6a437cfb33)
1999-02-11 22:12:49 +00:00
Luke Leighton
c6d16eea43 the UNICODE issue...
(This used to be commit 73db80f341)
1999-02-11 18:50:13 +00:00
Luke Leighton
8b6b6b57b5 use jeremy's versions of the UNICODE routines.
(This used to be commit c5109ff782)
1999-02-10 22:30:47 +00:00
Luke Leighton
748f296a76 removal of the use of unistrn2 function: replace it with unistr2_to_str
which is more appropriate.
(This used to be commit ac72fe1ab3)
1999-02-09 19:51:44 +00:00
Luke Leighton
99a9b0f7c4 UNICODE byte ordering issue: typecast to uint16* replaced with SSVAL()
(This used to be commit 9084b7e33d)
1999-02-08 23:40:49 +00:00
Luke Leighton
6d698d51b3 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.
(This used to be commit d455c9d2c9)
1999-02-08 00:24:57 +00:00
Luke Leighton
1153f00f88 cache unix groups so that two-level getgrent calls don't occur.
(This used to be commit f7dfa55a2e)
1999-02-03 00:49:24 +00:00
Matthew Chapman
90b7084738 Added init_nt_time function which initialises an NTTIME to -1.
(This used to be commit e1e3875057)
1999-02-01 02:36:24 +00:00
Luke Leighton
9b5043cb2f 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.
(This used to be commit ad58cdfac6)
1999-01-29 21:22:08 +00:00
Luke Leighton
6b7e1ead37 rpcclient "Service Control Manager" svcenum [-i] command.
(This used to be commit a022710f1e)
1999-01-28 21:11:15 +00:00
Luke Leighton
0504064085 Service Control Manager - service enumeration.
(This used to be commit f4dd8f6b56)
1999-01-27 20:31:58 +00:00
Luke Leighton
f6c646467d set_port warning / unused / global/local variable overlap issues
cmd_svcctl.c tests got put into cvs by mistake.
(This used to be commit 0ed70972d7)
1999-01-27 19:37:29 +00:00
Matthew Chapman
c35bf45785 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.
(This used to be commit 91c77f5432)
1999-01-15 05:00:26 +00:00
Christopher R. Hertel
dc003d8d40 A while back, Andrew and I talked about making the debug parsing code a
better "fit" with other Samba code.  This is a small first step toward
doing what (I think) we agreed to do.

I've moved the key function from ubiqx/debugparse.c into lib/debug.c.  I
have also moved the enum from ubiqx/debugparse.h into the debug section in
smb.h.

The next thing to do is to get debug2html added into the Makefile.in so
that it is always produced when compiling the suite.

Chris -)-----
(This used to be commit 782474f41e)
1998-12-16 18:50:54 +00:00
Luke Leighton
254470cb56 added sid_name_use array argument to lsa_lookup_names and lsa_lookup_sids.
(This used to be commit 0b2095e092)
1998-12-14 20:23:20 +00:00
Luke Leighton
3cc7e2936a adding svcctl parsing code
(This used to be commit c6f2f58c74)
1998-12-09 23:16:37 +00:00
Luke Leighton
58a0cbc0c8 oops, util_pwdb.c appears to be included in PASSDB_OBJ not LIB_OBJ.
(This used to be commit ca10eb4490)
1998-12-09 16:30:37 +00:00
Luke Leighton
74576a48fd adding some enumerate services code, client and server.
(This used to be commit dacf5b152b)
1998-12-09 16:28:04 +00:00
Luke Leighton
7135fb0a2c adding "Service Control Manager" commands to rpcclient.
(This used to be commit e5ee965f8d)
1998-12-08 23:29:37 +00:00
Luke Leighton
3cca46f27e ldap_getpw() also needs to be (void)
(This used to be commit f36cf3b6a7)
1998-12-08 00:33:05 +00:00
Luke Leighton
0125141f86 compilation warnings due to missing (void) in ldap_close_connection.
(This used to be commit f11eb41658)
1998-12-08 00:30:23 +00:00
Luke Leighton
8308c000b2 adding srvsvc pipe.
(This used to be commit d06d636994)
1998-12-08 00:25:04 +00:00
Luke Leighton
9c848ec329 removed nt_pipe_fnum from struct cli_state. need to be able to call
LsaLookupSids etc from within SamrQueryAliasMembers, for example.
fnum is now a parameter to client functions.  thanks to mike black
for starting the ball rolling.
(This used to be commit bee8f7fa6b)
1998-12-07 20:23:41 +00:00
Luke Leighton
312f4f3960 - lib/unix_sec_ctxt.c
attempt at taking lib/uid.c and getting a unix security context
	change module that is independent of "cnums" and "snums".
	a security context is needed for pipes, not just IPC$ or other
	services.

- group database API

	added add_group/alias_member, del_group/alias_member,
	del_group/alias_entry functions.  del_builtin_entry() is
	deliberately set to NULL to cause an exception, you cannot
	delete builtin aliases.

- parse_lsa.c srv_lsa.c

	fixed lookup_names code, it was a load of trash and didn't do
	anything.

- cmd_samr.c rpcclient.c srv_samr.c

	added "deletegroup", "deletealias", "delaliasmem", "delgroupmem",
	"addgroupmem", "addaliasmem", "createalias", "creategroup", to
	both client and server code.

	server code calls into unix stubs right now, which don't actually
	do anything.  the only instance where they are expected to do
	anything is in appliance mode NOT even in the ldap code or anything.

	client code modified to call samr_lookup_names() for group code
	(because we can) and lsa_lookup_names() for alias code (because
	we have to).

- srv_lookup.c

	oops, lookup on unsplit name, we got lookup on DOMAIN, DOMAIN\name
	instead of DOMAIN, name.
(This used to be commit b8175702ef)
1998-12-07 17:23:48 +00:00
Luke Leighton
7cbd3bcef5 added delete domain group and local group and delete domain group member.
(This used to be commit bf15343def)
1998-12-04 23:06:27 +00:00
Luke Leighton
8891f8c6b9 fixing "addgroupmem" and "enumgroups -m" commands, samr_open_group()
needed a flags fields as you get 0x0000 0010 and 0x0000 001f unknown
values for different purposes, no-one's going to tell us what they
are and i don't CARE!
(This used to be commit aabb4b3bc5)
1998-12-04 22:00:39 +00:00
Luke Leighton
89c56492a8 - oops, i got "add alias member" and "delete alias member" swapped.
- samr_enum_dom_users, the first 4 bytes is some sort of garbage,
  nt5-beta2 clears them out to zeros whereas nt4 does not.
  fixed bug where we were assuming that the first 4 bytes of a
  response _had_ to be non-zero.

- cli_lsarpc.c: forgot to append the rid on the lsa_lookup_names()
  client call.

- added in "addaliasmem" and "addgroupmem" commands.  the addaliasmem
  command actually turned out to be a "delaliasmem" :-) :-)

- parse_lsa.c: moved assert array check to after the size of useable
  array space is set...
(This used to be commit 165b15a8ca)
1998-12-04 21:48:06 +00:00