1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-05 21:57:51 +03:00

976 Commits

Author SHA1 Message Date
Jean-François Micouleau
cfb5e91178 added cli_net_auth_3 client code.
changed cli_nt_setup_creds() to call cli_net_auth_2 or cli_net_auth_3 based on a switch.
pass also the negociation flags all the way.
all the places calling cli_nt_setup_creds() are still using cli_net_aut2(), it's just for future use and for rpcclient.

in the future we will be able to call auth_2 or auth_3 as we want.

	J.F.
(This used to be commit 4d38caca40f98d0584fefb9d66424a3db5b5789e)
2002-08-30 10:46:59 +00:00
Andrew Tridgell
dcd0291694 convert the LDAP/SASL code to use GSS-SPNEGO if possible
we now do this:

- look for suported SASL mechanisms on the LDAP server
- choose GSS-SPNEGO if possible
- within GSS-SPNEGO choose KRB5 if we can do a kinit
- otherwise use NTLMSSP

This change also means that we no longer rely on having a gssapi
library to do ADS.

todo:
- add TLS/SSL support over LDAP
- change to using LDAP/SSL for password change in ADS
(This used to be commit b04e91f660d3b26d23044075d4a7e707eb41462d)
2002-08-30 06:59:57 +00:00
Volker Lendecke
957d9ab384 There's more work to be done on samsync. Intermediate commit, now
I get all the groups at least.

Volker
(This used to be commit 23a4f6991e93797afad0043689737a1b20c67f60)
2002-08-29 10:36:05 +00:00
Andrew Tridgell
d5a4242d88 show builtin groups in samdump
(This used to be commit c1e00f5f160985323f5a9ade42f2ebb2a798b17c)
2002-08-29 08:00:15 +00:00
Volker Lendecke
32da080463 'No news is good news' might sometimes be confusing, at least to me :-)
Volker
(This used to be commit f76a5431f0448efbc879aee965c643e2e362632a)
2002-08-28 10:34:28 +00:00
Jelmer Vernooij
2b2b0f7119 Put in intermediate version of new SAM system. It's not stable yet, code
might be ugly, etc - please don't blame me for anything but instead try to fix
the code :-). Compiling of the new sam system can be enabled with the
configure option --with-sam

Removing passdb/passgrp.c as it's unused
fix typo in utils/testparm.c
(This used to be commit 4b7de5ee236c043e6169f137992baf09a95c6f2c)
2002-08-28 04:54:43 +00:00
Gerald Carter
907bec3513 add hook for MSG_PRINTER_DRVUPGRADE that numps the change_id on all printers bound to a given driver
(This used to be commit e913d508d4f894eb3f0e59b9c28b0fc5b56962ec)
2002-08-27 22:34:14 +00:00
Andrew Tridgell
84b4e79227 a few minor cleanups in the cldap request
(This used to be commit 228fc518da0404fe770175d5277fe5f5b08f9c67)
2002-08-22 22:50:57 +00:00
Andrew Tridgell
2a505d023f added a 'net rpc samdump' command for dumping the whole sam via
samsync operations (as a BDC)
(This used to be commit e4cb106d2e3e6a41529369545a7a6ce5fe6d8986)
2002-08-22 22:48:54 +00:00
Andrew Bartlett
16caf06f60 This is like jht's (abortive) patch for showing only non-default testparm
options.

Andrew Bartlett
(This used to be commit 4cd822d9e4e5f35a47b0837bfa73c8a457e6cc85)
2002-08-21 20:29:11 +00:00
Jelmer Vernooij
d3aa76cef5 Patch from Paul Green <Paul.Green@stratus.com> to be more POSIX-compatible
(This used to be commit addf29e6765393b25c35bd833d29e29e4581c233)
2002-08-21 19:59:23 +00:00
Volker Lendecke
30e51241ec pdbedit needs global_myname to be set in order to display the
user SIDs correctly.

Volker
(This used to be commit 287b7bda11100c42f2cdea36a20a81f6ea397f43)
2002-08-21 19:48:56 +00:00
Volker Lendecke
e573a2a32c global_myname is a pstring, not an fstring
(This used to be commit 2df34c9bfc76ee832e5005a2ad0ff0b6abb98034)
2002-08-21 19:39:38 +00:00
Volker Lendecke
90e65e7ac7 Add 'net rpc getsid' to fetch the PDC's SID into the local secrets.tdb
Print domain SID on 'net rpc info'

Volker
(This used to be commit 12fd889a3f0e3eeeb27a51cdd7f648a59083f2ba)
2002-08-21 17:23:34 +00:00
Volker Lendecke
f3110c6884 just comment typos
(This used to be commit 169e784f4829ef356ed6232ace950d43cac1d467)
2002-08-21 17:07:10 +00:00
Volker Lendecke
1ea5e17f95 Fix debug level initialization for net.c
Volker
(This used to be commit 5af5326f1311a49d3c8316e1dcc27037b831065a)
2002-08-21 11:48:05 +00:00
Andrew Tridgell
d44015ae91 print out the GUID in the CLDAP reply
(This used to be commit 8aae10bcdc05fca4e0281ac91a7679c60b791534)
2002-08-19 16:56:09 +00:00
Andrew Tridgell
e6873a8f7f we now parse the cldap reply and print its contents. There are a
couple of unknown fields we still need to work out.
(This used to be commit 67b4dbd5c9f2665d5e6157b8cd522ebff4b8a4ea)
2002-08-19 15:59:14 +00:00
Andrew Tridgell
e38148f78c we now receive and parse the main cldap netlogon reply.
we still need to parse the core of the structure
(This used to be commit 6780ae25bf7ca291f612682dec7ee7ff44c24bef)
2002-08-19 15:30:26 +00:00
Andrew Tridgell
4b1baa5a70 added a 'net ads lookup' command that does a CLDAP NetLogon query to a
win2000 server. It does seem to work, and win200 sends us a valid
reply, but we don't parse it yet. Maybe tomorrow :)
(This used to be commit 6352508c54cee333ed7c0e3ebc372be7cd60ed62)
2002-08-19 03:17:03 +00:00
Jelmer Vernooij
f0255b38bc sync 3.0 branch with HEAD
(This used to be commit 1b83b78e332b9d28914eff155530e81cf2073a58)
2002-08-17 14:45:04 +00:00
Simo Sorce
10712f9a22 *** empty log message ***
(This used to be commit cb72eead70509eddaa051571f3eed3c46304b5f8)
2002-08-15 13:25:25 +00:00
Tim Potter
60444c3383 Merge some usage info from APPLIANCE_HEAD.
(This used to be commit aa93db5abed75b5c9a032a080c07473fafa53a43)
2002-08-11 19:23:09 +00:00
Andrew Bartlett
6ddba1e99b Fix the %m security bug again - and try to make it harder to reintroduce in
future.

This moves us from fstrcpy() and global variables to 'get' and 'set' functions.

In particular, the 'set' function sainity-checks the input, in the same way as
we always have.

Andrew Bartlett
(This used to be commit e57a896f06b16fe7e336e1ae63a0c9e4cc75fd36)
2002-08-10 23:20:04 +00:00
Andrew Tridgell
db20fa5d4e fixed 'net ads chostpass' for new ads structures
(This used to be commit 3b0e60e522b669bad77e70d9c6f484a08ff84612)
2002-08-06 10:01:38 +00:00
Andrew Tridgell
cded51d936 added 'net rpc testjoin' and 'net ads testjoin' commands
unfortuately we don't seem to be able to auto-test the ADS join due to
a rather nasty property of the GSSAPI library.
(This used to be commit 87c34a974a91e940bd26078a68dd84f4341d6913)
2002-08-05 14:11:50 +00:00
Andrew Tridgell
ab9ff0fa73 This fixes a number of ADS problems, particularly with netbiosless
setups.

- split up the ads structure into logical pieces. This makes it much
  easier to keep things like the authentication realm and the server
  realm separate (they can be different).

- allow ads callers to specify that no sasl bind should be performed
(used by "net ads info" for example)

- fix an error with handing ADS_ERROR_SYSTEM() when errno is 0

- completely rewrote the code for finding the LDAP server. Now try DNS
  methods first, and try all DNS servers returned from the SRV DNS
  query, sorted by closeness to our interfaces (using the same sort code
  as we use in replies from WINS servers). This allows us to cope with
  ADS DCs that are down, and ensures we don't pick one that is on the
  other side of the country unless absolutely necessary.

- recognise dnsRecords as binary when displaying them

- cope with the realm not being configured in smb.conf (work it out
  from the LDAP server)

- look at the trustDirection when looking up trusted domains and don't
  include trusts that trust our domains but we don't trust
  theirs.

- use LDAP to query the alternate (netbios) name for a realm, and make
  sure that both and long and short forms of the name are accepted by
  winbindd. Use the short form by default for listing users/groups.

- rescan the list of trusted domains every 5 minutes in case new trust
  relationships are added while winbindd is running

- include transient trust relationships (ie. C trusts B, B trusts A,
  so C trusts A) in winbindd.

- don't do a gratuituous node status lookup when finding an ADS DC (we
  don't need it and it could fail)

- remove unused sid_to_distinguished_name function

- make sure we find the allternate name of our primary domain when
  operating with a netbiosless ADS DC (using LDAP to do the lookup)

- fixed the rpc trusted domain enumeration to support up to approx
  2000 trusted domains (the old limit was 3)

- use the IP for the remote_machine (%m) macro when the client doesn't
  supply us with a name via a netbios session request (eg. port 445)

- if the client uses SPNEGO then use the machine name from the SPNEGO
  auth packet for remote_machine (%m) macro

- add new 'net ads workgroup' command to find the netbios workgroup
  name for a realm
(This used to be commit e358d7b24c86a46d8c361b9e32a25d4f71a6dc00)
2002-08-05 02:47:46 +00:00
Simo Sorce
dd93ff381d passwords where not checked (you cannot check if the same buffer differs from itself).
they where alo not clean after use!

Simo.
(This used to be commit 5a257096e9afdcd1dea863dff43952457a74a9f1)
2002-08-04 15:40:39 +00:00
Tim Potter
0efda5cc21 Merge of print notify fixes from APPLIANCE_HEAD.
(This used to be commit 7bf9ca6ca36fa319a57eab05567d49a003237bb5)
2002-08-02 03:57:40 +00:00
Andrew Tridgell
ce344ad4b7 fixed a net crash bug if we can't find a DC in a 'net rpc' command
(This used to be commit ced5dc4e05badfb07cbae7a2880825b9bad4e68d)
2002-07-31 05:38:53 +00:00
Andrew Tridgell
a5b6fbdf60 make sure that 'net ads info' gives info on the server we specify, not
our smb.conf setup.
(This used to be commit cffa881092e48db10a712575a8671f695e8ef813)
2002-07-31 01:44:37 +00:00
Andrew Tridgell
55c978d85e net ads info now reports the IP of the LDAP server as well as its name - very useful in scripts
(This used to be commit fc0d5479b575c1f495b9251413eed18ec1e37e02)
2002-07-30 15:34:10 +00:00
Tim Potter
11785c7bc8 Use common popt definition for -d option.
(This used to be commit 8c17904848a6206ab35652625ff5f3afcf6bcb0d)
2002-07-29 09:25:23 +00:00
Andrew Bartlett
5b5208a0b8 Add the ability to set account policies too.
Andrew Bartlett
(This used to be commit 2bf6edf78b64335bf10c10c893d6e8fa0fac708b)
2002-07-28 06:43:03 +00:00
Andrew Bartlett
9423ac9b4f Clean this code up a little. If it's alrady asprintf()ed, I see no
need for a manual strdup() too...
(This used to be commit 71452365c8d9aa3d06b64716636a32bfebd3d4f8)
2002-07-28 02:17:57 +00:00
Andrew Bartlett
2a03547b61 Rafal 'Mimir' Szczesniak <mimir@diament.ists.pwr.wroc.pl> has been busy
again, and has added 'net rpc trustdom list' support.

This lists the trusted and trusting domains of a remote PDC.

I've applied these almost directly, just fixing some special
case code for when there are *no* trusting domains.  We still
have some parse errors in this case however.

Andrew Bartlett.


From mimir's e-mail:

Here are another patches adding trust relationship features.
More details:

    Better error reporting in cli_lsa_enum_trust_dom().
    Implementation of cli_samr_enum_dom_users() which cli_samr.c
    lacked.

    More "consts" -- one of arguments in net_find_dc().
    Modified implementation of run_rpc_command() -- now it
    allows to reuse already opened connection (if it is passed)
    to remote server's IPC$ (e.g. as part of longer exchange
    of rpc calls). I'm sure Andrew will argue ;-)
    More neat version of rpc_trustdom_list() function.
(This used to be commit f0890026820ee3e432147130b46de4610e583381)
2002-07-27 00:15:02 +00:00
Andrew Bartlett
a564900074 Mimir has been busy with patches again, and sent in the following
patches:

Andrew Bartlett

From his e-mail:

Below I attach the following patches as a result of my work
on trusted domains support:
 1) srv_samr_nt.c.diff
    This fixes a bug which caused to return null string as
    the first entry of enumerated accounts list (no matter what
    entry, it was always null string and rid) and possibly
    spoiled further names, depeding on their length.
    I found that while testing my 'net rpc trustdom list'
    against nt servers and samba server.
 2) libsmb.diff
    Now, fallback to anonymous connection works correctly.
 3) smbpasswd.c.diff
    Just a little fix which actually allows one to create
    a trusting domain account using smbpasswd
 4) typos.diff
    As the name suggests, it's just a few typos fix :)
(This used to be commit 888d595fab4f6b28318b743f47378cb7ca35d479)
2002-07-26 13:05:29 +00:00
Andrew Bartlett
24675d99e5 Make it possible to query account policy values from pdbedit (set to come soon).
Update account_pol.c to use just uint32, rather then uint32 for paramaters,
int32 for storage.  (The int32 functions didn't have seperate return/status
values, uint32 functions use a pointer-paramater).

Move the #define -> string from a swtich to a table, so we can look it up
both ways.

Andrew Bartlett
(This used to be commit c5b5e3d653f5c38a283d901a409be6603d5103f7)
2002-07-24 05:26:32 +00:00
Tim Potter
de4752d6e7 Fix up dir drive call.
(This used to be commit fe229cc126a4bfdce12882ac7eaa893e00cd506e)
2002-07-21 06:32:25 +00:00
Andrew Bartlett
ceb73e9b3e More cleanups, and add a comment/hint not to clean somthing up in future :-)
Andrew Bartlett
(This used to be commit 21b0e8f560849be77bde463cf006ea0de54211e9)
2002-07-21 04:01:04 +00:00
Andrew Bartlett
afb7d1dc48 Another smattering of static and const
(This used to be commit 897cc4a610932e596f8a9807213166e380ef0203)
2002-07-21 03:26:10 +00:00
Tim Potter
0357388636 Renamed all the new_cli_netlogon_* functions to cli_netlogon_*
as they're no longer new!
(This used to be commit 277f6bbb9a63541a473a80a7994e9bde5c6f22dc)
2002-07-21 00:49:16 +00:00
Andrew Bartlett
9d983e3f3a Oops, my bad. I forgot to assign this, so lookupnames wasn't doing much :-)
(This used to be commit 508106285380b772850238a8ed6b78a2c3334887)
2002-07-20 14:01:40 +00:00
Andrew Bartlett
29075c97d3 More fixes towards warnings on the IRIX compiler
(and yes, some of these are real bugs)

In particular, the samr code was doing an &foo of various types, to a function
that assumed uint32.  If time_t isn't 32 bits long, that broke.

They are assignment compatible however, so use that and an intermediate
variable.

Andrew Bartlett
(This used to be commit 30d0998c8c1a1d4de38ef0fbc83c2b763e05a3e6)
2002-07-20 13:02:47 +00:00
Andrew Bartlett
9175bd2fe7 correctly declare global_myworkgroup to be the right size.
Andrew Bartlett
(This used to be commit 860f5b1a0c1898f1ce380d249610eeaaeb43b9e0)
2002-07-20 12:03:11 +00:00
Andrew Bartlett
ea9d3057e9 Try to fix up warnings - particularly on the IRIX 64 bit compiler (which had a
distinction between uchar and char).

Lots of const etc.

Andrew Bartlett
(This used to be commit 8196ee908e10db2119e480fe1b0a71b31a16febc)
2002-07-20 11:58:06 +00:00
Andrew Bartlett
6081538818 Update the usage for smbgroupedit to document -d for 'description'.
I think this one is due to metze.

Andrew Bartlett
(This used to be commit bce3a2b1d893d83f701205d7969569571f6279b0)
2002-07-20 06:52:42 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-07-15 10:35:28 +00:00
cvs2svn Import User
ec167dc9cc This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit b8d39651fb90ef170055735412417239a63afc5d) 2002-07-14 22:15:21 +00:00
Andrew Bartlett
3d1b9bfb29 Show the account flags in the 'verbose' listing of pdbedit.
Andrew Bartlett
(This used to be commit b5ec92d7a2e5ba33b641267d2319d101d70a0d9a)
2002-07-14 08:38:09 +00:00