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

300 Commits

Author SHA1 Message Date
Luke Leighton
860688f6e7 error-code checking in lsa_lookup_sids. anonymous connections for
domain info.  adjusting net_srv_get_info function.
(This used to be commit 42eb916fae)
1999-10-01 18:11:57 +00:00
Luke Leighton
6bf6b0ad44 added rpcclient SamrQueryDisplayInfo command "dispinfo"
(This used to be commit 6c98d6c9aa)
1999-09-14 21:04:02 +00:00
Luke Leighton
827599cbb2 restructuring
(This used to be commit 9d74161a92)
1999-09-12 23:59:09 +00:00
Luke Leighton
85f0d0bff3 using #define report
(This used to be commit 7fc2ee2f96)
1999-09-12 23:39:57 +00:00
Luke Leighton
736c507722 debugged enumgroups -g option
(This used to be commit 1cde47ba6a)
1999-08-30 17:15:59 +00:00
Luke Leighton
501acbba23 added call to samr_query_groupinfo in enumgroups command (-m option)
(This used to be commit e2a72e2c64)
1999-08-30 17:07:53 +00:00
Luke Leighton
42fdd41b1d improved "dominfo" rpcclient command
(This used to be commit 65a54b6e16)
1999-08-29 16:36:21 +00:00
Luke Leighton
53b4095d2c added experimental del_groupmem and del_aliasmem commands that were not
being called from rpcclient.c

improved add_groupmem command, but cannot test it against nt non-pdc!
(This used to be commit 7a383a2a02)
1999-08-29 13:18:10 +00:00
Matthew Chapman
7930cb0dfc Fixed rpcclient's samuser command.
(This used to be commit 60a8b478ac)
1999-04-11 02:34:44 +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
b6db424576 reverted access control flags in enum commands.
(This used to be commit 97a0b24955)
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 1c330d5682)
1999-03-08 19:19:01 +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
0e402f197d enum dom users buffer was 0x80 not 0x8000. must fix "enumeration" code
as you need to make multiple enum dom users calls.
(This used to be commit b5396d3c6d)
1999-02-11 18:48:18 +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
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
801d625898 issues spotted by herb.
(This used to be commit 57e0254946)
1998-12-07 21:40:53 +00:00
Luke Leighton
54529fbd66 bugs in rpcclient. add_aliasmem uses a DOM_SID2 not a DOM_SID.
(This used to be commit 8a85d7abed)
1998-12-07 21:32:02 +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
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
Luke Leighton
cf0ea874b1 - renamed do_samr_xxx to samr_xxx
- renamed do_lsa_xxx to lsa_xxx

- added "enumgroups [-m]" command, enumerates groups, shows members.
- added cmd_sam_add_groupmem(), need to call these in rpcclient.c
- added cmd_sam_add_aliasmem(), need to call these in rpcclient.c

- modified "enumaliases [-m]" command

- improved "enumgroups" and "enumaliases" to display names not just RIDS/SIDs.

- renamed "samr_unknown_12" to "samr_lookup_rids".

- added the following client-side functions:

	get_samr_query_groupmem()
	get_samr_query_aliasmem()
	get_samr_query_groupinfo()
	samr_enum_dom_groups()
	samr_enum_dom_aliases()
	samr_add_aliasmem()
	samr_add_groupmem()

- improved display output (display.c)
(This used to be commit eacc5e581a)
1998-12-04 16:30:00 +00:00
Luke Leighton
32167eda0d added createalias command to rpcclient
(This used to be commit 4771d5451b)
1998-12-03 22:20:30 +00:00
Luke Leighton
b99dc808df create domain group command (creategroup) added to rpcclient.
renamed do_samr_xxxx to samr_xxxx.
(This used to be commit 1e5d81c154)
1998-12-03 20:50:33 +00:00
Luke Leighton
31044dd8e6 - adding builtin[alias]db.
- lib/sids.c:

	generate_sam_sid() modified to take a domain name: it now
	generates "DOMAIN_NAME.SID".  reasons:

	1) if you run multiple samba servers on the same machine
	under different netbios names as members of a domain,
	they won't all use the same SID, which is a _big_ mistake
	but it would happen _by default_.

	2) we have (had) a problem with sid_to_string() and string_to_sid()
	which cause SIDs to be incorrectly read.  one of the major
	reasons for *NOT* making this change was so as not to disrupt
	existing users.  but as they will be anyway by this bug,
	we might as well go ahead.

- passdb/smbpass.c:

	wanted to change the meaning of the name in the smbpasswd
	file to an "nt" name not a "unix" name.  this is probably
	not a good idea: reverted this.

- output formatting / bug-fixing in rpcclient query_useraliases code.
(This used to be commit e4930f5f48)
1998-11-30 15:08:58 +00:00
Luke Leighton
30038de462 weekend work. user / group database API.
- split sam_passwd and smb_passwd into separate higher-order function tables

- renamed struct smb_passwd's "smb_user" to "unix_user".  added "nt_user"
plus user_rid, and added a "wrap" function in both sam_passwd and smb_passwd
password databases to fill in the blank entries that are not obtained
from whatever password database API instance is being used.

NOTE: whenever a struct smb_passwd or struct sam_passwd is used, it MUST
be initialised with pwdb_sam_init() or pwd_smb_init(), see chgpasswd.c
for the only example outside of the password database APIs i could find.

- added query_useraliases code to rpcclient.

- dealt with some nasty interdependencies involving non-smbd programs
and the password database API.  this is still not satisfactorily
resolved completelely, but it's the best i can do for now.

- #ifdef'd out some password database options so that people don't
mistakenly set them unless they recompile to _use_ those options.

lots of debugging done, it's still not finished.  the unix/NT uid/gid
and user-rid/group-rid issues are better, but not perfect.  the "BUILTIN"
domain is still missing: users cannot be added to "BUILTIN" groups yet,
as we only have an "alias" db API and a "group" db API but not "builtin-alias"
db API...
(This used to be commit 5d5d7e4de7)
1998-11-29 20:03:33 +00:00
Luke Leighton
9f14f281ff changed syntax of registry commands so keys can start with HKLM or HKU.
sorted lookupsids command
(This used to be commit 13a0ee851f)
1998-11-11 14:23:55 +00:00
Luke Leighton
eadc5b8c6e domain aliases added a bit better: does local aliases if you query
for sid S-1-5-20 and does (nothing at the moment) if you query for
your own sid.
(This used to be commit da40f26f4b)
1998-10-21 22:36:26 +00:00
Jeremy Allison
6e3af45afe Fixed mainly signed/unsigned issues found by SGI cc in -fullwarn mode.
smbd/chgpasswd.c: Fixed (my) stupid bug where I was returning stack based variables. Doh !
smbd/trans2.c: Allows SETFILEINFO as well as QFILEINFO on directory handles.
Jeremy.
(This used to be commit 0b44d27d0b)
1998-10-21 16:58:34 +00:00
Luke Leighton
d8f0e60195 signed / unsigned warnings (found by herb).
how do i switch on these warnings in gcc?????
(This used to be commit 39db385a0c)
1998-10-20 22:37:44 +00:00
Luke Leighton
ef234c67d5 oops
(This used to be commit 7f8dfedfc0)
1998-10-19 20:10:33 +00:00
Luke Leighton
41e97c33ab output password change messages instead of debug message.
(This used to be commit b9e728a97b)
1998-10-19 17:50:19 +00:00
Luke Leighton
a785f8d2c9 dce/rpc
(This used to be commit 29434f496c)
1998-10-16 23:40:59 +00:00
Luke Leighton
71adb8b0a0 strtoul replace with strtol
(This used to be commit 4ebd2c5140)
1998-10-16 21:46:07 +00:00
Luke Leighton
d4a82ea26d rpc client mods (ntlmssp flags)
(This used to be commit 16256f86bf)
1998-10-16 20:07:02 +00:00
Luke Leighton
948f81a592 warnings spotted by ./configure.developer options
(This used to be commit 29434bf195)
1998-10-14 07:00:00 +00:00
Luke Leighton
935dc98f66 dce/rpc
(This used to be commit 69f5f9f889)
1998-10-14 06:29:20 +00:00
Luke Leighton
eb70607c86 dce/rpc
(This used to be commit b0af7cfd9d)
1998-10-10 00:58:12 +00:00
Luke Leighton
827a9d862e dce/rpc
(This used to be commit dfb48aab61)
1998-10-10 00:46:28 +00:00
Luke Leighton
78c1fd054f dce/rpc
(This used to be commit 8a7ac4a25d)
1998-10-09 23:31:50 +00:00
Luke Leighton
8158620124 dce/rpc.
(This used to be commit e0445419b2)
1998-10-09 20:17:11 +00:00
Luke Leighton
755986764f dce/rpc
(This used to be commit 32d0f5e4a5)
1998-10-09 19:05:19 +00:00
Luke Leighton
6909350ed9 dce/rpc
(This used to be commit 62fdeef1b7)
1998-10-08 23:57:46 +00:00
Jeremy Allison
cf3a9741dc Changes to test in configure if capabilities are enabled on a system.
Changes to get Samba to compile cleanly with the IRIX compiler
with the options : -fullwarn -woff 1209,1174 (the -woff options
are to turn off warnings about unused function parameters and
controlling loop expressions being constants).
Split prototype generation as we hit a limit in IRIX nawk.
Removed "." code in smbd/filename.c (yet again :-).
Jeremy.
(This used to be commit e0567433bd)
1998-09-28 21:43:48 +00:00
Richard Sharpe
ecd8ca2431 Fixed up more possibly uninitialized variables.
Now only two compilation warnings seem to be left.

Luke may want to check the changes I made.
(This used to be commit 2456c95c16)
1998-09-27 08:29:50 +00:00
Jeremy Allison
c9d26f921c Fixed unused variable warning messages.
Jeremy.
(This used to be commit 64ad5b4bb0)
1998-09-25 23:24:28 +00:00
Luke Leighton
4b9e0941b9 rpcclient: got samr command "enumusers -g -u" working
(This used to be commit 3a00023efe)
1998-09-25 23:14:20 +00:00
Luke Leighton
6fb5804b28 added in samr commands. assistance in returning the missing functions,
automatically removed because they were "unused", would be appreciated.
(This used to be commit d0f7b0d915)
1998-09-25 22:20:05 +00:00
Luke Leighton
66d5d73a5d added rpcclient program
(This used to be commit aa38f39d67)
1998-09-25 21:01:52 +00:00