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

209 Commits

Author SHA1 Message Date
Luke Leighton
aabb4b3bc5 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!
0001-01-01 00:00:00 +00:00
Luke Leighton
165b15a8ca - 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...
0001-01-01 00:00:00 +00:00
Luke Leighton
eacc5e581a - 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)
0001-01-01 00:00:00 +00:00
Luke Leighton
4771d5451b added createalias command to rpcclient 0001-01-01 00:00:00 +00:00
Luke Leighton
1e5d81c154 create domain group command (creategroup) added to rpcclient.
renamed do_samr_xxxx to samr_xxxx.
0001-01-01 00:00:00 +00:00
Luke Leighton
e4930f5f48 - 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
5d5d7e4de7 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...
0001-01-01 00:00:00 +00:00
Luke Leighton
68342a29a8 LsaLookupNames client call (first used as lookupnames command in rpcclient). 0001-01-01 00:00:00 +00:00
Jeremy Allison
4c2b5a0098 Makefile.in configure configure.in include/config.h.in: Changes for DGUX and UNIXWARE.
groupdb/aliasdb.c groupdb/aliasfile.c groupdb/groupfile.c: Don't use snprinf, use slprintf.
include/includes.h: Fix YP problem.
include/smb.h: Fix ZERO_STRUCTP.
lib/util_sock.c: Added strerror() in debugs.
passdb/ldap.c: Don't use snprinf, use slprintf.
rpc_client/cli_lsarpc.c rpc_client/cli_pipe.c rpc_parse/parse_sec.c rpc_server/srv_pipe.c: Don't use snprinf, use slprintf.
script/installman.sh: DGUX changes.
smbd/open.c smbd/oplock.c: Fixed gcc warnings.
web/swat.c: Changes USER to SWAT_USER.
0001-01-01 00:00:00 +00:00
Luke Leighton
d9b59580dc need 32 bit status codes to be negotiated because of STUPID dos "error more
data needed" message gets treated as a serious error code (which it isn't)
so the client code terminates.
0001-01-01 00:00:00 +00:00
Luke Leighton
06abdfd68e security descriptors.
kanji const char* warnings.
0001-01-01 00:00:00 +00:00
Luke Leighton
7466c3113e jean-f. sent me some S-1-3-0,1,2,3 SIDs and names. S-1-3 doesn't exist.
security descriptor testing.  hey wow, you can get a SD then send it back!
0001-01-01 00:00:00 +00:00
Luke Leighton
22ef5160bf oops! 0001-01-01 00:00:00 +00:00
Luke Leighton
abdc9d790b clearing up security descriptor 0001-01-01 00:00:00 +00:00
Luke Leighton
13a0ee851f changed syntax of registry commands so keys can start with HKLM or HKU.
sorted lookupsids command
0001-01-01 00:00:00 +00:00
Luke Leighton
c05254a150 registry delete value command: "regdeleteval".
this is just so unbelievably simple to do...
0001-01-01 00:00:00 +00:00
Luke Leighton
ddfdb65346 renamed unk_1b to flush_key 0001-01-01 00:00:00 +00:00
Luke Leighton
7df85b9567 - renamed open_policy to open_hklm.
- renamed open_unk_4 to open_hku

- fixed createkey issue spotted by phil cox
0001-01-01 00:00:00 +00:00
Luke Leighton
20987b6105 rpcclient registry key delete command: "regdeletekey". 0001-01-01 00:00:00 +00:00
Luke Leighton
5e9567e3c7 registry modification requires a "sync" or "refresh" on the parent key.
opcode 0xb added to do this.  a likely candidate name is "RegFlushKey".
0001-01-01 00:00:00 +00:00
Jeremy Allison
9668a5ef50 include/local.h:
include/smb.h:
param/loadparm.c: Made GUEST_SESSSETUP run time selectable. Horror of horrors :-).
printing/printing.c: Added J.F.'s latest fix.
rpc_parse/parse_misc.c:
parse_reg.c:
rpcclient/cmd_reg.c:
rpcclient/display.c: SGI compiler signed/unsigned issues.
smbd/reply.c: Made GUEST_SESSSETUP run time selectable. Horror of horrors :-).
utils/testparm.c: Added extra test.
Jeremy.
0001-01-01 00:00:00 +00:00
Luke Leighton
36fcb4a6e6 rpcclient registry commands. 0001-01-01 00:00:00 +00:00
Luke Leighton
373f60256f split socket util functions into util_sock.c. util.c NOT committed
and util_sock.c NOT included in Makefile.in.

registry commands added to rpcclient.

waiting for 2_0_0 split before committing modified files.  these files
are new modules, and are not referenced in the Makefile.in
0001-01-01 00:00:00 +00:00
Luke Leighton
b4ae65e2d0 rpctorture command 0001-01-01 00:00:00 +00:00
Luke Leighton
da40f26f4b 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
0b44d27d0b 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
39db385a0c signed / unsigned warnings (found by herb).
how do i switch on these warnings in gcc?????
0001-01-01 00:00:00 +00:00
Luke Leighton
7f8dfedfc0 oops 0001-01-01 00:00:00 +00:00
Luke Leighton
b9e728a97b output password change messages instead of debug message. 0001-01-01 00:00:00 +00:00
Luke Leighton
29434f496c dce/rpc 0001-01-01 00:00:00 +00:00
Luke Leighton
d717d58c11 strtoul removed, strtol used instead 0001-01-01 00:00:00 +00:00
Luke Leighton
4ebd2c5140 strtoul replace with strtol 0001-01-01 00:00:00 +00:00
Luke Leighton
16256f86bf rpc client mods (ntlmssp flags) 0001-01-01 00:00:00 +00:00
Luke Leighton
fa86770d56 trust password 0001-01-01 00:00:00 +00:00
Luke Leighton
60c0f22a4e rpcclient interactive login (with trust account changing if you are root)
cli_session_setup handles null sessions correctly
0001-01-01 00:00:00 +00:00
Luke Leighton
29434bf195 warnings spotted by ./configure.developer options 0001-01-01 00:00:00 +00:00
Luke Leighton
69f5f9f889 dce/rpc 0001-01-01 00:00:00 +00:00
Luke Leighton
b0af7cfd9d dce/rpc 0001-01-01 00:00:00 +00:00
Luke Leighton
dfb48aab61 dce/rpc 0001-01-01 00:00:00 +00:00
Luke Leighton
8a7ac4a25d dce/rpc 0001-01-01 00:00:00 +00:00
Luke Leighton
e0445419b2 dce/rpc. 0001-01-01 00:00:00 +00:00
Luke Leighton
caeb99201a basic client-side ntcreateX function (hard-wired values except filename) 0001-01-01 00:00:00 +00:00
Luke Leighton
32d0f5e4a5 dce/rpc 0001-01-01 00:00:00 +00:00
Luke Leighton
62fdeef1b7 dce/rpc 0001-01-01 00:00:00 +00:00
Andrew Tridgell
91597c12fb - fixed a bunch of warnings and minor errors
- got smbtorture to compile
- removed %D from some of lukes code - Luke, what is %D? it ain't
  portable anyway
0001-01-01 00:00:00 +00:00
Luke Leighton
1a9a22c657 rpcclient srvsvc commands. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
1388a6fe8c fixed initialisation bug in rpcclient (stdout is not a constant) 0001-01-01 00:00:00 +00:00
Andrew Tridgell
c626214e23 don't call functions that aren't there yet. (Luke had the code
commented out in the makefile)
0001-01-01 00:00:00 +00:00
Luke Leighton
bcf39ffdcc Makefile.in :
- added srvsvc client files

clientgen.c :

	- replaced cli_error(cli, int *cls, int *err) with
	  cli_error(cli, uint8 cls, uint32 *err).  this version detects
	  32 bit status messages.  the DOS error "MORE_DATA", the
	  equivalent of the 32 bit *warning* 0x8000 0005
	  (STATUS_BUFFER_OVERFLOW), was being processed as an error,
	  terminating the cli_receive_trans() call.

cli_pipe.c :

	- replaced calls that had been incorrectly modified from
	  32 bit warnings (0x8000 0005 - STATUS_BUFFER_OVERFLOW)
	  to 8 bit DOS errors (0x01 0xEA - MORE_DATA).
	  the use of the old version of cli_error (DOS only)
	  instead of the new one (DOS and 32 bit) caused the
	  dce/rpc client code to fail.

	- replaced 2 space indentation with tab indentation in all functions.

cli_srvsvc.c :
cmd_srvsvc.c :

	- added these files back in, fixing them up to use jeremy's
	  modified versions of the dce/rpc client functions.

parse_srv.c :

	- added back in some "unused" functions required by dce/rpc
	  client-side code.  it would be helpful if all such "unused"
	  functions could be added back in.

rpcclient.c :

	- added "session", "file", "share", "connection" enumeration
	  functions back in.  these are equivalent to nt's "NetXXXXXEnum"
	  Win32 (MSDN) functions.

	- added "srvinfo" function back in.  this is equivalent to
	  nt's NetServerGetInfo Win32 (MSDN) function.
0001-01-01 00:00:00 +00:00
Richard Sharpe
351b9a0f8b Fix another possibly unitialized variable ... 0001-01-01 00:00:00 +00:00
Luke Leighton
299a723d4e lsa_lookup_sids command added. severe debugging needed on lookup_sids
code.  added "quality of service" capability to lsa_open_policy code.

different lsa_open_policy queries are *not* dealt with in the server code.
answers like "0xC000 0022" - access denied - will have to be made to
lsa_lookup_sids calls when a "quality of service" request is *not* specified
in the lsa_open_policy call.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e570db46fc Got very strict about the differences and uses of
uid_t, gid_t and vuid. Added sys_getgroups() to get
around the int * return problem. Set correct datatypes
for all uid, gid and vuid variables.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e0567433bd 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.
0001-01-01 00:00:00 +00:00
Richard Sharpe
2456c95c16 Fixed up more possibly uninitialized variables.
Now only two compilation warnings seem to be left.

Luke may want to check the changes I made.
0001-01-01 00:00:00 +00:00
Jeremy Allison
64ad5b4bb0 Fixed unused variable warning messages.
Jeremy.
0001-01-01 00:00:00 +00:00
Luke Leighton
3a00023efe rpcclient: got samr command "enumusers -g -u" working 0001-01-01 00:00:00 +00:00
Luke Leighton
d0f7b0d915 added in samr commands. assistance in returning the missing functions,
automatically removed because they were "unused", would be appreciated.
0001-01-01 00:00:00 +00:00
Luke Leighton
8d23da91cb added wksinfo command to rpcclient, which don't work too good. 0001-01-01 00:00:00 +00:00
Luke Leighton
aa38f39d67 added rpcclient program 0001-01-01 00:00:00 +00:00