Luke Leighton [Mon, 28 Feb 2000 19:41:09 +0000 (19:41 +0000)]
From Elrond@Wunder-Nett.org Tue Feb 29 05:53:10 2000
Date: Mon, 28 Feb 2000 17:29:48 +0100
From: Elrond <Elrond@Wunder-Nett.org>
To: Luke Kenneth Casson Leighton <lkcl@samba.org>
Subject: _samr_query_sec_obj
Hi Luke,
- moved the SD-generation code out of
samrd/srv_samr_sam_tdb.c:_samr_query_sec_obj into its own
samrd/samr_util.c
- updated the SD to have the same order and include
Builtin\Account Operators, as seen on an nt4sp4 ws.
- used this function in samrpassd (which was broken here
and usrmgr didn't work) and samrtdbd (for consistency)
(I can't compile-check samrnt5ldap, so I will send Luke
Howard a patch to inspect.)
- clean-up: Mainly policy-handles... but also other stuff
- debugging and type-checking of data associated with
POLICY_HND in samrtdbd
(I suspect, there's a problem in sam_query_sec_obj, see
the new WARNING, that appears.)
- rpcclient/samedit: enumaliases has new option:
[-d Domain], so I could do "enumaliases -d Builtin"
After this patch my usrmgr worked better, but now it looks
like it is thinking, it talks to a WS instead of a server.
I can't see the domain-groups, only aliases, and in the
user-properties, there are only 3 buttons for "Groups",
"Profiles" and "RAS", the others are missing... I tried a
long time to find out about it... I failed, so could you
have a look at this?
[lkcl: this because winregd is returning "i am a wksta"]
Okay, and another thing:
You seemed to look for the bit on the user-objects, that
allows password-changing: I think, it must be 0x0004,
cause:
Everyone has: 0x2035b
Normal user : 0x20044
0x20040 is included in the bits, everyone has, 0x0004 is
left over....
Luke Leighton [Sun, 27 Feb 2000 19:12:07 +0000 (19:12 +0000)]
added bind nack to server-side.
jeremy, the majority of "negative" responses are actually "fault" pdus.
the only circumstances in which a bind nack is returned is if there is
something wrong with a bind request. e.g the NTLMSSP auth bind-request
(negotiate) stage, which contains the client hostname and client domain,
contains an unrecognised name such as NULL.
e.g the NETSEC (netlogon secure channel) auth bind-request stage which
again happens (coincidentally) to contain the client hostname and client
domain, contains a hostname/domainname tuple for which no NetrReqChal+
NetrAuth2 with flags 0x400001ff has just previously been done.
i.e: NetrReqChal("\\myserver", "mydomain", ...);
NetrAuth2("\\myserver", mydomain, 0x400001ff, ...);
[now do netsec]
NetSecBindRequest("\\somestupidservername", "totalgarbagedomainname")
this should be rejected with a bind NACK.
Luke Leighton [Sun, 27 Feb 2000 17:52:19 +0000 (17:52 +0000)]
testing password change showed up some bugs in NTLMSSP calcs, plus one in
cli_samr.c. from the NetrSamLogon the first 8 bytes of the
LM# are received, i forgot to pass this over.
Jeremy Allison [Fri, 25 Feb 2000 22:25:25 +0000 (22:25 +0000)]
client/client.c:
libsmb/clientgen.c: Fixes for Win2k smbclient browsing.
Other fixes implement smbpasswd -x user to delete users. Also allows swat
to do the same.
Jeremy.
Luke Leighton [Fri, 25 Feb 2000 05:43:49 +0000 (05:43 +0000)]
tim, after speaking with andrew he noticed that you were calling become_root()
and unbecome_root(). client-side code CANNOT call these functions, it must
only call the *stub* versions of these.
the only circumstances under which it is ok for client-side code to call
become_root() and unbecome_root() is if you are actually calling client-side
code from inside a root process to the msrpc loop-back interface.
this is because you cannot _access_ the msrpc loop-back interface unless you
are root (use a server name of "\\." instead of "\\someservername").
Luke Leighton [Thu, 24 Feb 2000 19:48:17 +0000 (19:48 +0000)]
added previously_granted_access parameter to se_access_check(). it
makes life simpler because this function will need to be called inside
EVERY single msrpc function.
Luke Leighton [Wed, 23 Feb 2000 21:25:59 +0000 (21:25 +0000)]
From Elrond@Wunder-Nett.org Thu Feb 24 08:11:57 2000
Date: Wed, 23 Feb 2000 19:28:08 +0100
From: Elrond <Elrond@Wunder-Nett.org>
To: Luke Kenneth Casson Leighton <lkcl@samba.org>
Subject: receiving multiple pdus
Hi Luke,
Someone ran rpcclients enumusers against a 2500 user domain
yesterday... and it crashed...
The code to receive multiple pdus is broken...
I fixed most of the things, I could find out myself, but in
rpc_client/cli_connect.c:rpc_api_rcv_pdu() in the
MSRPC_LOCAL-case, I don't know, what you wanted there.
(ret = ...; ret = ...;)
What I did:
- fixed receiving of multiple pdus
(now you should be able to run rpcclient against your
favorite 2500 user domain)
- fixed some possible problem in become_guest
(I realy should write something to samba-technical, this
one is possibly interesting for HEAD/2.0 too)
- fixed up some copyrights (I know, I modified those)
Elrond
[lkcl: the code that elrond fixed was to read a dce/rpc header of
0x18 bytes. i _thought_ i'd removed this code and replaced it
with read-an-entire-pdu. it _is_ ok to do this, because the last
pdu turns up short when using SMBs. you request 0x1630 bytes and
you only get... say.... 0x40, 0x18 of which is the header and the
rest is the last part of the last PDU]
Jeremy Allison [Wed, 23 Feb 2000 02:02:33 +0000 (02:02 +0000)]
lib/system.c: Fixed gcc warnings.
nmbd/nmbd_processlogon.c: Use "True" and "False" instead of 1 and 0.
Others - preparing for multiple pdu write code.
Jeremy.
Luke Leighton [Wed, 23 Feb 2000 00:37:07 +0000 (00:37 +0000)]
dammit! lsa_set_secret() works DIFFERENTLY depending on the target!
nt4, nt4sp4+ and nt5!
adding an lsa querysecretsecobj command (gets a security descriptor
of a secret, e.g $MACHINE.ACC) to see if it's possible to do a SET
SEC_OBJ command, in order to bypass some of the [good] security
settings that microsoft improved on LSA secrets, i.e you can only
set them, you can't _read_ them.
dammit!
i need to know the format of these, and lsadump2 doesn't help very
much because it uses LsarQuerySecret directly in lsass.exe, it doesn't
get data over-the-wire. (http://razor.bindview.com).
Luke Leighton [Tue, 22 Feb 2000 03:28:13 +0000 (03:28 +0000)]
From patl@cag.lcs.mit.edu Tue Feb 22 14:22:35 2000
Date: 21 Feb 2000 22:12:43 -0500
From: Patrick J. LoPresti <patl@cag.lcs.mit.edu>
To: Luke Kenneth Casson Leighton <lkcl@samba.org> Cc: Multiple recipients of list SAMBA-TECHNICAL <samba-technical@samba.org>
Subject: Re: TNG: making %U work again for logon path et. al.
> urr, the problem is that the \PIPE\NETLOGON conncetion is done
> anonymously.
Well, at least the user name is available by the time I need it; see
the patch.
Luke Leighton [Fri, 18 Feb 2000 20:23:00 +0000 (20:23 +0000)]
From Elrond@Wunder-Nett.org Sat Feb 19 06:56:45 2000
Date: Fri, 18 Feb 2000 20:31:56 +0100
From: Elrond <Elrond@Wunder-Nett.org>
To: Luke Kenneth Casson Leighton <lkcl@samba.org>
Subject: Re: DCE/RPC over SMB - nt login, code walk-through.
I made a general type field for the state-data of the
handle, so that has nothing to do with pipes.
[elrond also added a name, for debugging purposes].
the intent of the "type" field is to be able to check that the void*
is being type-cast back to the right kind of data!
Luke Leighton [Fri, 18 Feb 2000 17:29:32 +0000 (17:29 +0000)]
From Elrond@Wunder-Nett.org Sat Feb 19 04:14:38 2000
Date: Fri, 18 Feb 2000 16:02:28 +0100
From: Elrond <Elrond@Wunder-Nett.org>
To: Luke Kenneth Casson Leighton <lkcl@samba.org>
Subject: POL_HND cleanup 1
Hi,
Since you didn't answer my mail, where I asked, if I should
clean up the POLICY_HND-usage, I just started to do it.
(For CVS, maybe:)
I removed most of the unnecessary references to
POLICY_HND->data, which mostly were something like this:
Luke Leighton [Fri, 18 Feb 2000 05:49:25 +0000 (05:49 +0000)]
ok. a test previously showed that joining an NT5rtm to a domain with
samrtdbd was failing, because the domain was opened read-only and then
the user was opened read-write for create.
_un_fortunately, i had created an entire domain-user database, which of
course was opened read-only, and then the create-user OF course, failed.
so i had to change this to a system of creating INDIVIDUAL user databases
ARGH.
now, it should be possible to open at the domain-level (which is just a
directory), and then open a user for write-create, and away we go.
Luke Leighton [Thu, 17 Feb 2000 21:04:04 +0000 (21:04 +0000)]
patch from michael breuer <mbreuer@siac.com> to fix compile-problems for
the compiler he was using (thank you!). michael, i didn't include the
packaging/ because i haven't got that subdir checked out.
Luke Leighton [Thu, 17 Feb 2000 06:54:33 +0000 (06:54 +0000)]
after seeing a message where it looked like someone was connection to
a workgroup not a server with rpcclient, i checked the cli_net_use_add()
codepath.
changed make_nmb_name(..., 32, ...) to make_nmb_name(..., 0x20, 000)
Luke Leighton [Wed, 16 Feb 2000 20:15:43 +0000 (20:15 +0000)]
From Elrond@Wunder-Nett.org Thu Feb 17 07:13:17 2000
Date: Wed, 16 Feb 2000 20:19:37 +0100
From: Elrond <Elrond@Wunder-Nett.org>
To: Luke Kenneth Casson Leighton <lkcl@samba.org>
Subject: Re: DCE/RPC over SMB - nt login, code walk-through.
But I fixed api_lsa_close to do the right thing with the
handle-_in/out_-param. :)