1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-18 19:17:08 +03:00

162 Commits

Author SHA1 Message Date
Volker Lendecke
e60faccc1b Factor out generation of an info3 struct from a serversupplied_info 2008-05-17 23:17:40 +02:00
Günther Deschner
7ccca9a004 _netr_LogonSamLogon: fix lm session key length.
Thanks Volker for pointing this out.

Guenther
2008-04-29 20:22:02 +02:00
Günther Deschner
0aaf975560 Fix samlogon rpc client & server.
Guenther
2008-03-27 13:06:43 +01:00
Günther Deschner
42971b71ac Fix _netr_LogonControl2(). Return talloced dcname.
Guenther
2008-03-26 19:18:08 +01:00
Günther Deschner
d078a87571 Add my copyright.
Guenther
2008-02-27 19:38:48 +01:00
Günther Deschner
0d0b939953 Use pidl for _netr_LogonSamLogon() and _netr_LogonSamLogonEx().
Guenther
2008-02-16 14:28:55 +01:00
Günther Deschner
c0b1a87658 Replace DOM_CHAL with "struct netr_Credential" where we can right now.
This allows to remove some more old netlogon client calls.

Guenther
2008-02-15 23:57:54 +01:00
Günther Deschner
47806386e5 Fix the netlogon rpc_server build.
Guenther
2008-02-15 23:36:31 +01:00
Günther Deschner
a9683cbf43 Use pidl for _netr_LogonSamLogoff().
Guenther
2008-02-15 21:52:19 +01:00
Günther Deschner
5d81cc136b Use pidl for _netr_ServerAuthenticate2().
Guenther
2008-02-15 21:41:38 +01:00
Günther Deschner
943386c5dd Use pidl for _netr_ServerAuthenticate().
Guenther
2008-02-15 21:32:14 +01:00
Günther Deschner
85b7489dd2 Use pidl for _netr_ServerPasswordSet().
Guenther
2008-02-15 21:18:23 +01:00
Günther Deschner
4bd02aa6cd Use pidl for _netr_LogonControl2.
Guenther
2008-02-13 23:06:09 +01:00
Günther Deschner
f0c6668858 Add some netr_NETLOGON_INFO init functions.
Guenther
2008-02-13 23:01:34 +01:00
Günther Deschner
ef42431941 Use pidl for _netr_ServerReqChallenge.
Guenther
2008-02-13 14:18:58 +01:00
Günther Deschner
983ac0a676 Pure cosmetics: remove trailing whitespace in netlogon server.
Guenther
2008-02-13 14:18:23 +01:00
Günther Deschner
ec4947525e Use pidl for _netr_LogonControl.
Guenther
2008-02-13 12:19:37 +01:00
Günther Deschner
243bdaeea7 Use pidl for _netr_NetrEnumerateTrustedDomains().
This call is completely broken. For now, just make sure that we return the exact same
data as before the conversion to pidl.

Guenther
2008-02-13 10:23:45 +01:00
Günther Deschner
cb0fad1c97 Enable build of pidl generated netlogon server.
Guenther
2008-01-31 13:46:54 +01:00
Günther Deschner
1acb9daf80 Cleanup status codes inside _net_logon_ctrl2() reply structs.
Guenther
2008-01-31 11:27:49 +01:00
Günther Deschner
153253e14f Remove unused rpc_ds marshalling code that is unused now.
Guenther
2008-01-29 15:51:19 +01:00
Günther Deschner
f7100156a7 Finally enable pidl generated SAMR & NETLOGON headers and clients.
Guenther
2008-01-17 16:54:46 +01:00
Volker Lendecke
bb35e794ec Replace sid_string_static by sid_string_dbg in DEBUGs 2007-12-15 22:09:36 +01:00
Jeremy Allison
55b4f9d003 Remove pstring from everything in rpc_server except
srv_spoolss_nt.c and srv_srvsvc_nt.c.
They're next :-).
Jeremy.
2007-11-27 11:22:58 -08:00
Jeremy Allison
963fc76852 Remove most of the remaining globals out of lib/util_sock.c.
I have a plan for dealing with the remaining..... Watch
this space.
Jeremy.
2007-11-03 23:20:10 -07:00
Jeremy Allison
95d01279a5 I can't get away without a 'length' arg. :-).
Jeremy.
2007-11-03 18:41:26 -07:00
Jeremy Allison
e848506c85 Stop get_peer_addr() and client_addr() from using global
statics. Part of my library cleanups.
Jeremy.
2007-11-03 18:15:45 -07:00
Jeremy Allison
98e154c312 This is a large patch (sorry). Migrate from struct in_addr
to struct sockaddr_storage in most places that matter (ie.
not the nmbd and NetBIOS lookups). This passes make test
on an IPv4 box, but I'll have to do more work/testing on
IPv6 enabled boxes. This should now give us a framework
for testing and finishing the IPv6 migration. It's at
the state where someone with a working IPv6 setup should
(theorecically) be able to type :
smbclient //ipv6-address/share
and have it work.
Jeremy.
2007-10-24 14:16:54 -07:00
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00
Andrew Tridgell
87c91e4362 r23801: The FSF has moved around a lot. This fixes their Mass Ave address. 2007-10-10 12:28:27 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Volker Lendecke
eaefd00563 r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'm
doing this because for the clustering the marshalling is needed in more
than one place, so I wanted a decent routine to marshall a message_rec
struct which was not there before.

Tridge, this seems about the same speed as it used to be before, the
librpc/ndr overhead in my tests was under the noise.

Volker
2007-10-10 12:22:17 -05:00
Volker Lendecke
cc92ce665d r22911: Pass a messaging_context to message_send_all 2007-10-10 12:22:07 -05:00
Volker Lendecke
e43e94cda1 r22761: This introduces lib/conn_tdb.c with two main functions: connections_traverse
and connections_forall. This centralizes all the routines that did individual
tdb_open("connections.tdb") and direct tdb_traverse.

Volker
2007-10-10 12:21:55 -05:00
Stefan Metzmacher
fa322f0cc9 r22001: change prototype of dump_data(), so that it takes unsigned char * now,
which matches what samba4 has.

also fix all the callers to prevent compiler warnings

metze
2007-10-10 12:18:59 -05:00
Jim McDonough
21abbeaee9 r19058: Implement "user cannot change password", and complete "user must change
password at next logon" code.  The "password last set time" of zero now
means "user must change password", because that's how windows seems to
use it.  The "can change" and "must change" times are now calculated
based on the "last set" time and policies.

We use the "can change" field now to indicate that a user cannot change
a password by putting MAX_TIME_T in it (so long as "last set" time isn't
zero).  Based on this, we set the password-can-change bit in the
faked secdesc.
2007-10-10 12:15:06 -05:00
Volker Lendecke
d6547d12b1 r16409: Fix Klocwork ID's.
1177

In reg_perfcount.c: 1200 1202 1203 1204
In regfio.c: 1243 1245 1246 1247 1251

Jerry, the reg_perfcount and regfio.c ones, can you take a look please? This
is really your code, and I'm not sure I did the right thing to return an
error.

smbcacls.c: 1377
srv_eventlog_nt.c: 1415 1416 1417
srv_lsa_nt.c: 1420 1421
srv_netlog_nt.c: 1429
srv_samr_nt: 1458 1459 1460

Volker

Volker
2007-10-10 11:18:52 -05:00
Jeremy Allison
a0d368197d r16241: Fix Klocwork #106 and others like it.
Make 2 important changes. pdb_get_methods()
returning NULL is a *fatal* error. Don't try
and cope with it just call smb_panic. This
removes a *lot* of pointless "if (!pdb)" handling
code. Secondly, ensure that if samu_init()
fails we *always* back out of a function. That
way we are never in a situation where the pdb_XXX()
functions need to start with a "if (sampass)"
test - this was just bad design, not defensive
programming.
Jeremy.
2007-10-10 11:17:27 -05:00
Jeremy Allison
e5b7acc9b5 r16054: Janitor for Volker ? Volker - some reason you didn't
fix this in 3.0 ?
Jeremy.

We had no way to return NT_STATUS_OK from the netlogon serverpwset,
although
we successfully set the machine password...

One thing the samba3 join test found.

Volker
2007-10-10 11:17:18 -05:00
Gerald Carter
57c705ea63 r14450: Fix more get_md4pw() breakage caused by missing "breaks"
in the switch statement which matched the schannel type
against the account type.
2007-10-10 11:15:30 -05:00
Gerald Carter
a36529535d r14448: * protect against NULL cli_state* pointers in cli_rpc_pipe_open()
* Fix inverted logic check for machine accounts in get_md4pw()
2007-10-10 11:15:30 -05:00
Günther Deschner
c35eb44937 r14443: rework get_md4pw() to ease debugging. The only functional change is that
we now check wheter the sec_channel_type matches the trust account type.

Guenther
2007-10-10 11:15:30 -05:00
Günther Deschner
5b89e8bc24 r13711: * Correctly handle acb_info/acct_flags as uint32 not as uint16.
* Fix a couple of related parsing issues.
* in the info3 reply in a samlogon, return the ACB-flags (instead of
  returning zero)

Guenther
2007-10-10 11:10:25 -05:00
Gerald Carter
6f1afa4acc r13590: * replace all pdb_init_sam[_talloc]() calls with samu_new()
* replace all pdb_{init,fill}_sam_pw() calls with samu_set_unix()
2007-10-10 11:10:16 -05:00
Gerald Carter
19b7593972 r13576: This is the beginnings of moving the SAM_ACCOUNT data structure
to make full use of the new talloc() interface.  Discussed with Volker
and Jeremy.

* remove the internal mem_ctx and simply use the talloc()
  structure as the context.
* replace the internal free_fn() with a talloc_destructor() function
* remove the unnecessary private nested structure
* rename SAM_ACCOUNT to 'struct samu' to indicate the current an
  upcoming changes.  Groups will most likely be replaced with a
  'struct samg' in the future.

Note that there are now passbd API changes.  And for the most
part, the wrapper functions remain the same.

While this code has been tested on tdb and ldap based Samba PDC's
as well as Samba member servers, there are probably still
some bugs.  The code also needs more testing under valgrind to
ensure it's not leaking memory.

But it's a start......
2007-10-10 11:10:15 -05:00
Gerald Carter
b65be8874a r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()
macro which sets the freed pointer to NULL.
2007-10-10 11:10:14 -05:00
Jeremy Allison
4877f336b2 r13557: (Hopefully) get the creds store/restore key right from
the correct part of the netlogon and schannel packets.
Jeremy.
2007-10-10 11:10:13 -05:00
Jeremy Allison
fd84d9703e r13556: Ensure that any potential creds operation are protected
by schannel if "server schannel = true" was set.
Jeremy.
2007-10-10 11:10:13 -05:00
Jeremy Allison
ea82958349 r13553: Fix all our warnings at -O6 on an x86_64 box.
Jeremy.
2007-10-10 11:10:13 -05:00
Jeremy Allison
43f095a38d r13548: Always use the get_remote_macinhe_name() as the key
for the creds store. This should fix the problems
Jerry reported (but I have still to run tests :-).
Jeremy.
2007-10-10 11:10:13 -05:00