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

744 Commits

Author SHA1 Message Date
Luke Leighton
0ce128e355 delineation between smb and msrpc more marked. smbd now constructs
pdus, and then feeds them over either a "local" function call or a "remote"
function call to an msrpc service.  the "remote" msrpc daemon, on the
other side of a unix socket, then calls the same "local" function that
smbd would, if the msrpc service were being run from inside smbd.

this allows a transition from local msrpc services (inside the same smbd
process) to remote (over a unix socket).

removed reference to pipes_struct in msrpc services.  all msrpc processing
functions take rpcsrv_struct which is a structure containing state info
for the msrpc functions to decode and create pdus.

created become_vuser() which does everything not related to connection_struct
that become_user() does.

removed, as best i could, connection_struct dependencies from the nt spoolss
printing code.

todo: remove dcinfo from rpcsrv_struct because this stores NETLOGON-specific
info on a per-connection basis, and if the connection dies then so does
the info, and that's a fairly serious problem.

had to put pretty much everything that is in user_struct into parse_creds.c
to feed unix user info over to the msrpc daemons.  why?  because it's
expensive to do unix password/group database lookups, and it's definitely
expensive to do nt user profile lookups, not to mention pretty difficult
and if you did either of these it would introduce a complication /
unnecessary interdependency.  so, send uid/gid/num_groups/gid_t* +
SID+num_rids+domain_group_rids* + unix username + nt username + nt domain
+ user session key etc.  this is the MINIMUM info identified so far that's
actually implemented.  missing bits include the called and calling
netbios names etc.  (basically, anything that can be loaded into
standard_sub() and standard_sub_basic()...)
(This used to be commit aa3c659a8d)
1999-12-12 01:25:49 +00:00
Luke Leighton
4ab9d91428 ABOUT TIME!!!!!!!!
damn, this one is bad.

started, at least two days ago, to add an authentication mechanism to
the smbd<->msrpc redirector/relay, such that sufficient unix / nt
information could be transferred across the unix socket to do a
become_user() on the other side of the socket.

it is necessary that the msrpc daemon inherit the same unix and nt
credentials as the smbd process from which it was spawned, until
such time as the msrpc daemon receives an authentication request
of its own, whereupon the msrpc daemon is responsible for authenticating
the new credentials and doing yet another become_user() etc sequence.
(This used to be commit 30c7fdd6ef)
1999-12-08 21:43:03 +00:00
Luke Leighton
a0ba234cf9 the first independent msrpc daemon - lsarpcd.
one horrible cut / paste job from smbd, plus a code split of shared
components between the two.

the job is not _yet_ complete, as i need to be able to do a become_user()
call for security reasons.  i picked lsarpcd first because you don't
_need_ security on it (microsoft botched so badly on this one, it's not
real.  at least they fixed this in nt5 with restrictanonymous=0x2).
fixing this involves sending the current smb and unix credentials down
the unix pipe so that the daemon it eventually goes to can pick them
up at the other end.

i can't believe this all worked!!!
(This used to be commit 2245b0c6d1)
1999-12-06 00:44:32 +00:00
Luke Leighton
b96e4e4f7d domain_client_validate() no longer takes serverlist, it calls
get_any_dc_name().
(This used to be commit e21367c0eb)
1999-12-02 19:07:13 +00:00
Luke Leighton
7aebbb90c8 need a domain resolving function, but get_trusted_serverlist() will do.
this is horrible.
(This used to be commit 9df973fe71)
1999-12-02 16:52:38 +00:00
Luke Leighton
c15b95cd1e cli_session_setup() now takes an extra argument (host name). hey, what
the heck is a cli_session_setup() call doing in here???  this should use
cli_establish_connection()server!
(This used to be commit fa054c96c6)
1999-12-01 21:47:30 +00:00
Luke Leighton
6ddfc68e04 sys_select added one more argument (read, write selectors).
(This used to be commit e4d92ff9df)
1999-12-01 02:15:14 +00:00
Luke Leighton
0d44ff9a76 attempting to resolve the issue that multiple servers often specified in
parameters to connect to \PIPE\NETLOGON.
(This used to be commit d1986ade30)
1999-11-29 21:47:14 +00:00
Luke Leighton
2752e372b6 WARNING! MOVED rpc_server/srv_lsa_hnd.c TO lib/util_hnd.c
CVS UPDATE MAY ISSUE WARNING ABOUT lib/util_hnd.c MODIFICATION
DATE BEING IN THE FUTURE.  CVS CHECKOUT A NEW REPOSITORY MAY BE
SAFER.
(This used to be commit c26e8a6ac5)
1999-11-24 18:15:50 +00:00
Luke Leighton
d7889cd223 rewrote policy handle code to be generic (it's needed for client-side too)
attempted to fix regsetsec command
(This used to be commit eaac0923e0)
1999-11-24 18:09:33 +00:00
Luke Leighton
32b9508d06 implement server-side generation of NTLMv2 session key. YESSS :-)
(This used to be commit 1092b4f6fb)
1999-11-21 19:59:56 +00:00
Luke Leighton
680dcc9341 hmmm... have to add client-side support in domain_client_validate() to
_use_ user session key.
(This used to be commit be6a6b1393)
1999-11-21 17:27:20 +00:00
Luke Leighton
4081147c31 adding user session key into network netlogon response.
(This used to be commit c73f6b0d02)
1999-11-21 17:11:00 +00:00
Luke Leighton
387cc182e6 oops, #ifdef'd cli_shutdown out, as the fun has _already_ started:
NT refuses to play nice, and establish a trust relationship.
(This used to be commit 98c42764fb)
1999-11-20 22:05:31 +00:00
Luke Leighton
27b8df4d9b attempting to establish inter-domain trust relationships. modified
smbpasswd so it can be used to set up inter-domain trust account.
(This used to be commit 99ec0620c3)
1999-11-20 21:59:16 +00:00
Luke Leighton
24a069eac3 modified domain_client_validate to take trust account name / type. this
is to pass DOMAIN_NAME$ and SEC_CHAN_DOMAIN instead of WKSTA_NAME$ and
SEC_CHAN_WKSTA.

modified check_domain_security to determine if domain name is own domain,
and to use wksta trust account if so, otherwise check "trusting domains"
parameter and use inter-domain trust account if so, otherwise return
False.
(This used to be commit 97ec74e1fa)
1999-11-20 20:54:29 +00:00
Luke Leighton
161c11e4bc - bug in nmbd registering DOMAIN_NAME<1c> to WINS server; recursion
desired flag MUST be set in any NBT UDP packets sent to a WINS
  server, else they will go to the WINS client side of the NT NetBIOS
  kernel instead, and will get trashed.

- added \PIPE\browser server-side code.
(This used to be commit 8e406c1fa2)
1999-11-19 01:01:07 +00:00
Luke Leighton
4245278ca3 set "key does not exist" response to reg_query_val() (win32 status code
of 0x2).  [p.s. getting REALLY bored of this nt5rc2->samba domain stuff].
(This used to be commit a8801942f7)
1999-11-18 22:03:47 +00:00
Luke Leighton
b231d2fafa - added DCE/RPC "fault" PDU support.
- disabled (AGAIN) the GETDC "if (MAILSLOT\NTLOGON)" code that will get
NT5rc2 to work but WILL break win95 (AGAIN).  this needs _not_ to be
re-enabled but to be replaced with a better mechanism.

- added SMBwrite support (note: SMBwriteX already existed) as NT5rc2 is
sending DCE/RPC over SMBwrite not SMBwriteX.
(This used to be commit 25c70e3c98)
1999-11-15 22:11:10 +00:00
Luke Leighton
fe8383382d samuserset <username> -p password. YESSSSS :)
you have to use "ntlmv1" at the moment (i.e set client ntlmv2 = no).
(This used to be commit f52504c553)
1999-11-04 21:41:36 +00:00
Luke Leighton
cae821d459 adding experimental set user password command to rpcclient, it returns
error wrong password against nt.  ????
(This used to be commit b3f16e6b5a)
1999-11-04 00:09:15 +00:00
Luke Leighton
902b53dcc0 cli_nt_setup_creds() returns uint32 NT status code not a BOOL.
removed all comparisons to if (fn() == False), replaced with if (!fn()).
(This used to be commit fdef97eb7c)
1999-10-29 15:53:18 +00:00
Luke Leighton
6f9105c853 various. debug levels changed. nmbd doesn't need libsmb/clienttrust.c.
samr_lookup_rids() moved to a dynamic memory structure not a
static one limited to 32 RIDs.  cli_pipe.c reading wasn't checking
ERRmoredata when DOS error codes negotiated (this terminates
MSRPC code with prejudice).
(This used to be commit 8976eca2db)
1999-10-21 16:53:50 +00:00
Luke Leighton
eb9268550f David van Geyn spotted that ulong is not defined on FREEBSD, not supposed
to use ulong use uint32 instead.
(This used to be commit 16dd94db1f)
1999-10-05 21:35:17 +00:00
Jean-François Micouleau
ed5fbd743b don't leak printer handles,
don't coredump when adding forms,
and a small non obvious memory leak in the rpc buffers

	J.F.
(This used to be commit bee11f8889)
1999-09-27 13:12:55 +00:00
Luke Leighton
701f9ed2c9 reading in smb server domain name from SMBnegprot response
(This used to be commit 25025f4505)
1999-09-16 22:46:45 +00:00
Luke Leighton
b9b4c1d563 #defines for port 445 to SMB_PORT2
(This used to be commit a8d4560e00)
1999-09-15 17:30:02 +00:00
Luke Leighton
ddf33698b5 - initialising mach_passwd_file locks to zero (prev. uninit.)
- cleanup

- #defined report to sprintf as it's #defined to another function in
  other uses of cmd_lsarpc.c
(This used to be commit 8fb2ff247a)
1999-09-12 22:40:27 +00:00
Luke Leighton
856a3e2740 oops, port 455 instead of 445
(This used to be commit 4e5eac18d0)
1999-09-10 16:27:14 +00:00
Luke Leighton
7f8f5e15bd bertl <bs@niggard.org> patch for making samba listen on port 445, just like
nt 5 does.  cool!
(This used to be commit 727e1421b2)
1999-09-08 19:37:45 +00:00
Luke Leighton
ad000ee7dc spelling mistake.
(This used to be commit b8ac96cd9c)
1999-08-13 21:11:38 +00:00
Luke Leighton
dde759352f pnum should be a uint16.
(This used to be commit 41cb8b0ba0)
1999-08-13 19:35:33 +00:00
Tim Potter
331ab45321 Copy service name into vfs_connection_struct.
(This used to be commit 19242cd44e)
1999-07-22 04:47:14 +00:00
Tim Potter
f809734105 Pass VFS options defined in smb.conf to vfs_init() function.
(This used to be commit 8cde172a77)
1999-07-22 04:43:59 +00:00
Luke Leighton
46ce0d4619 comments requested by jeremy as to why NT/95 NULL-password distinction hack
was modified.
(This used to be commit 50f7bd8a9c)
1999-07-21 00:31:16 +00:00
Luke Leighton
33ed8059a2 NTLMv2 check being actioned when NT password response was only 24 chars.
added check to ensure response is more than 24 chars before bothering
to do an NTLMv2 check.
(This used to be commit 7a58895ff2)
1999-07-16 22:23:45 +00:00
Luke Leighton
0262b2a6b4 copy of password struct needed to be made prior to calling copy_passwd_struct
found by Bertl <bs@vpnet.at>.
(This used to be commit 93298bca1c)
1999-07-16 22:03:15 +00:00
Luke Leighton
7c29698e41 work-around for win95 NULL session bug: NULL password actually being
placed in data stream before username / domain, whereas NT doesn't do
this...
(This used to be commit 44e6d4c1b0)
1999-07-15 21:25:58 +00:00
Luke Leighton
939f6d6794 more dfs stuff. this looks like it's going to be more appropriate to use
the vfs tables.  at the moment, i replaced all calls to unix_convert()
with unix_dfs_convert().

this does the job, but it's not very nice.
(This used to be commit 00d4aebce9)
1999-07-15 20:44:24 +00:00
Luke Leighton
2b354d7330 dfs issues
(This used to be commit d9ada8b55d)
1999-07-15 17:52:44 +00:00
Luke Leighton
92b8937bae added %d %d to error message, try to track down the uid / smb_uid mismatch
(This used to be commit ec918ba144)
1999-07-15 17:50:27 +00:00
Luke Leighton
c553c01c86 removed strncpy()
(This used to be commit 4bdff27489)
1999-07-14 18:16:57 +00:00
Luke Leighton
d2b2dff2e8 dfs parsed string length was being set explicitly to value "6", overwriting
the correct length.
(This used to be commit 5d1fad53c2)
1999-07-13 19:52:33 +00:00
Luke Leighton
d9a18c82d1 Jean-Francois Micouleau's rewrite of Nigel William's DFS support
(This used to be commit e6116c40d4)
1999-07-12 21:33:11 +00:00
Luke Leighton
ac61e4aee2 lengths of NT passwords when "encrypt passwords = no" can be completely
random.  values seen can be as high as 18255.  this fails the check
of <= 24 which sets NT password length to 0, effectively ignoring it.
the <= 24 was removed in reply_sesssetup_X.
(This used to be commit 98d43b20dc)
1999-07-12 18:57:05 +00:00
Luke Leighton
8f1404739f Jean-Francois Micouleau's rewritten DFS patch, originally written by
Nigel Williams.  despite the data format being *exactly* the same as
NT's, this still doesn't work yet.  more work needed.
(This used to be commit 270981960b)
1999-07-12 18:46:15 +00:00
Luke Leighton
527820d306 oops, refused lm when ntlmv2 was true not false/auto. oops!
(This used to be commit 6b4b24d220)
1999-07-07 16:44:38 +00:00
Luke Leighton
e71801c3de reporting failure to accept ntlmv2 (only) with down-level protocols (LANMAN1
and below).
(This used to be commit be7b978249)
1999-07-06 21:26:39 +00:00
Luke Leighton
ec711742c0 smb_password_ok() checking incorrectly whether lm password exists.
when lmcompatibilitylevel=0x2 on nt sp4+ clients, lm# is not sent.
(This used to be commit e655e68474)
1999-07-06 21:25:42 +00:00
Luke Leighton
73891ca8e4 improving authentication code (tidyup).
(This used to be commit ab1a6aa42d)
1999-06-29 18:47:06 +00:00