1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

2674 Commits

Author SHA1 Message Date
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
5c5f544538 samr_lookup_names "none found" error needed corrections with empty lists.
(This used to be commit e164b5080c)
1999-02-19 17:41:05 +00:00
Luke Leighton
0cfca572c9 last unix group not being listed. spotted by jacques sansdrap.
(This used to be commit 2d5fc5c7cf)
1999-02-19 15:46:38 +00:00
Luke Leighton
b52903aefe problem been there for months: reg_r_info not aligning after string buffer.
(This used to be commit 66e2787ab7)
1999-02-18 18:50:44 +00:00
Michael Warfield
894a824041 Got to the bottom of another weird one...
Piping the output of smbmount back to autofs/automount was causing the
automount process to hang.  Reason was that automount was depending
on the pipe to close to continue on, rather than detecting the child
signal.  This occured with debug enabled and the daemon process was not
closing the stdout process.  Disabling debuging avoids the problem.
Debugging is turned off in the cvs repository and a warning placed over
the debugging option.
(This used to be commit 329ceaee49)
1999-02-18 04:33:06 +00:00
Luke Leighton
52fb07aea2 rpcclient shutdown command
(This used to be commit 59f081069a)
1999-02-16 18:04:21 +00:00
Luke Leighton
78314c2e32 bitmap to strings
(This used to be commit ba5919bcae)
1999-02-16 18:02:50 +00:00
Matthew Chapman
2737f26ad6 Always null-terminate strings.
Also some string length and sizeof(pointer) corrections.
(This used to be commit ce24191939)
1999-02-15 05:33:30 +00:00
Matthew Chapman
0baa42bdd7 Always null-terminate strings.
(This used to be commit b314430b21)
1999-02-15 05:31:52 +00:00
Michael Warfield
e588ffdaa8 Added caching of user password if it was entered via getpass. We were already
caching the password if it came from the command line or from the environment.
This completes the set and deals with the bloody nusance when reconnecting
a connection after we have gone daemon...  Grrr...

Added code to clean up the mount point following a catastrophic failure
during reconnect.  The smbmount daemon was exiting but leaving the mount
point in an unusable state.  If smbmount must exit following a reconnect
failure, we "unmount" the mount point and clean up mnttab.  Currently,
the unmount works, fixing some really ugly I/O errors and failure when
trying to remount.  The cleanup on mnttab still has problems.  This
is better than what it was and doesn't break anything that wasn't broken
before, so I'm committing this in even with the mnttab problem.  Will
commit the fix to that when I figure out what is busted there...

	-mhw-
(This used to be commit ad8389804c)
1999-02-14 23:15:54 +00:00
John Terpstra
3a0818ceb1 Folding into Samba-2.1.X tree documents added to 2.0.3.
(This used to be commit 1041d53ec2)
1999-02-14 04:40:05 +00:00
Michael Warfield
cbbac5455c Fixed a glibc glitch in smbumount.c and reenabled some debugging
in smbmount.c
(This used to be commit 4b4a706213)
1999-02-13 18:36:49 +00:00
Luke Leighton
b8082d0840 const cast issues. [p.s - tidy work, matt!]
(This used to be commit dad5baef19)
1999-02-12 15:35:27 +00:00
Luke Leighton
4f20234c78 const issues with byte mod / byte read macros.
(This used to be commit 98ecb88704)
1999-02-12 15:34:57 +00:00
Matthew Chapman
2b8292075c Cut and paste error.
(This used to be commit 9ea91d89d2)
1999-02-12 03:09:24 +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
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
f02321a998 refinement of random ipc$ SMBtrans torture test. send requests, and
don't wait for responses :-)
(This used to be commit c1d65e9060)
1999-02-11 18:35:26 +00:00
Luke Leighton
a71d268114 uninitialised pointer being freed if lookupnames failed. oops.
(This used to be commit d77de86858)
1999-02-11 17:25:26 +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
7a65924133 Having Well-known Domain Groups ("Domain Admins/Guests/Users") returned
under SID_NAME_ENUM 0x5 instead of 0x2 (Well-known group instead of
Domain Group) was making it impossible to view these groups from USRMGR.EXE.
(This used to be commit 3072044134)
1999-02-09 22:13:20 +00:00
Luke Leighton
4cb18cd734 groups and aliases being "manually" added which do not necessarily have
representation in the underlying database: removed this code.

for example, with the nt->unix mapping system (don't know about the ldap
one) if you want "Domain Admins" to appear you _must_ put it in the
domaingroup.map file.

the previous code was adding builtin aliases and well-known groups even
if they weren't in the domain maps.  bad idea.
(This used to be commit 56469578a1)
1999-02-09 21:56:06 +00:00
Luke Leighton
96983a13ba when multiple independent large rpc calls come in on the same pipe,
prev_pdu_file_offset was not being re-initialised to zero.
(This used to be commit fcaa121441)
1999-02-09 21:42:39 +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
3b12477f34 pwdb_smb_to_sam was not returning NULL for nt name so that
pwdb_sam_map_names() was using a "blank" static string instead of
a NULL pointer for nt names.  NULL means over-ride, so the nt name
got left as "blank".

this causes nt clients to terminate with extreme prejudice.
(This used to be commit ddd3501982)
1999-02-09 16:01:28 +00:00
Matthew Chapman
bfff648f38 Fix for NT BSOD problem. There's no reason to have two "NT usernames" running
around anyway.

The real problem is, once again, the brokenness of pwdb_sam_map_names et al.
This time it is deciding to return blank NT usernames, which NT's redirector
objects to.

I'm currently working on improving the pwdb/mapping code, should be ready in a
couple of weeks.
(This used to be commit 30a085bf80)
1999-02-09 03:57:10 +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
37c9693fc8 reload_services needs to be called prior to init_files but after
get_myname.
(This used to be commit 9ab81caa06)
1999-02-08 01:46:46 +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
ceef08b60e initialise my name (used in %h) prior to loading smb.conf files.
(This used to be commit ed128c38a8)
1999-02-03 17:10:44 +00:00
Luke Leighton
91403ea47d %s not $s
(This used to be commit 62118e15fe)
1999-02-03 16:30:54 +00:00
Luke Leighton
f61fc8923d corrections to get data stream for 2nd and subsequent pdus copied from
right place (forgot to subtract 0x18 header bytes)
(This used to be commit 5b9a7278da)
1999-02-03 01:58:52 +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
Luke Leighton
fe609d810e multiple dce/rpc PDUs failed to work after ntlmssp update was added.
(This used to be commit f082f07e76)
1999-02-03 00:48:27 +00:00
Luke Leighton
07948f3f2d server type announcements modified to include the "role" of the server:
domain member, pdc, bdc.
(This used to be commit d95bb252f8)
1999-02-02 19:53:10 +00:00
Michael Warfield
8fdc846070 Minor change to bring smbmount in the main branch in line with some bzero
to memset changes...
(This used to be commit 1cb8fcb33b)
1999-02-01 22:01:29 +00:00
Luke Leighton
68a1171c82 comma after DOM_MAP_USER removed
(This used to be commit ce1ae86cbd)
1999-02-01 16:32:01 +00:00
Matthew Chapman
1cf9521b2d Must set password length to 24 after we encrypt a password.
(This used to be commit af83778abc)
1999-02-01 05:25:54 +00:00
Matthew Chapman
c80c2e0d9e Initialise NTTIME properly in make_reg_q_enum_key instead of using
unix_to_nt_time hack. Seems to me it's ignored anyway (dummy return
buffer?).
(This used to be commit 1e3873111f)
1999-02-01 02:39:37 +00:00
Matthew Chapman
960c760be0 Fixed a domain functionality problem where NT clients would start
endlessly repeating a network SAMLOGON (hoping it to change, hmmm...).

( Guess what I found in pwdb_init_sam...

  unix_to_nt_time(&user->logon_time, (time_t)-1);
  unix_to_nt_time(&user->logoff_time, (time_t)-1);
  unix_to_nt_time(&user->kickoff_time, (time_t)-1);
  ... )
(This used to be commit e9c79c85e6)
1999-02-01 02:37:45 +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
Michael Warfield
f5ac863e5a Ok... Yet another round of fixes for smbmount and autofs.
1)  The earlier fix for the smbmount race conditions broke the PID
	registration with smbfs.  That fix has been backed out and
	replaced by a signalling convention from the child smbmount
	process back to the parent telling the parent when it is safe
	to exit.

2)  Fixing all of this uncovered a NASTY deadly embrace between smbmount,
	smbmnt, and autofs.  This was caused by the setsid call in the
	daemon code.  The smbmnt process no longer was registered as
	"magic" because it was no longer in the autofs process group.
	Many many kudos and thanks to H Peter Anvin for giving me the
	clue to solving this agravating puzzle.  The setsid was moved
	down the where the child signals the parent and a warn left in
	its place in the daemonize code.

3)  Fixed (actually worked around with a BUTT UGLY HACK) a problem with
	SMB_GET_MOUNTPID in smbumount.c.  The smb_fs.h header file has
	the parameter to this ioctl defined as a uid_t.  Unfortunately
	that's a 32 bit quantity under glibc and it's currently a 16 bit
	quantity in kernel space.  Undefined the macro and redefined
	it with a parameter of __kernel_uid_t.  That should keep us
	out of trouble till I can have someone fix smb_fs.h in the
	kernel sources...
(This used to be commit c5608093e4)
1999-01-31 21:28:55 +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
5a9859c7b0 removed encrypt-password code pre-cli_session_setup(), session setup
fn decides whether to encrypt password or not.
(This used to be commit 6d14db6a6c)
1999-01-29 19:31:52 +00:00
Luke Leighton
206013169c uni_svc_name not uni_srv_name
(This used to be commit 14080a564a)
1999-01-29 19:20:27 +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
92aca8b1b7 error code cleanup
(This used to be commit 61c40982d6)
1999-01-28 21:10:38 +00:00