1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

200 Commits

Author SHA1 Message Date
Volker Lendecke
03451a516a Fix coverity ID 525, 526, 527, 528, 529 and 530
Upon failure to allocate one of the arrays, further down the TALLOC_FREE would
have looked at the variables given to it without initizalizing.
(This used to be commit 6cac312731)
2008-03-05 22:36:18 +01:00
Günther Deschner
7269a504fd Add my copyright.
Guenther
(This used to be commit d078a87571)
2008-02-27 19:38:48 +01:00
Günther Deschner
d9a465b8df Use rpccli_lsa_LookupSids() in rpccli_lsa_lookup_sids_noalloc().
Guenther
(This used to be commit b62eddbc4e)
2008-02-18 10:03:49 +01:00
Günther Deschner
e655a10736 Use rpccli_lsa_LookupNames() inside of rpccli_lsa_lookup_names.
Guenther
(This used to be commit 5c0a2d697f)
2008-02-18 10:01:24 +01:00
Günther Deschner
ad5794ad5c Remove unused marshalling for LSA_REMOVE_ACCT_RIGHTS.
Guenther
(This used to be commit 80e39330bf)
2008-02-14 15:29:51 +01:00
Günther Deschner
d64ae7328a Remove unused marshalling for LSA_ENUM_ACCT_RIGHTS.
Guenther
(This used to be commit 34c0e64026)
2008-02-14 15:11:35 +01:00
Günther Deschner
25bc71f117 Remove unused marshalling for LSA_ADD_ACCT_RIGHTS.
Guenther
(This used to be commit 15b97d1aaf)
2008-02-14 14:40:27 +01:00
Günther Deschner
c6cd8ec909 Remove unused marshalling for LSA_LOOKUP_PRIV_VALUE.
Guenther
(This used to be commit 8125d8557f)
2008-02-14 13:53:27 +01:00
Günther Deschner
341e5ea3eb Remove unused marshalling for LSA_ENUMPRIVSACCOUNT.
Guenther
(This used to be commit 004598bc13)
2008-02-14 13:13:09 +01:00
Günther Deschner
8f7cc004ff Remove unused marshalling for LSA_ENUM_ACCOUNTS.
Guenther
(This used to be commit 8c476ad516)
2008-02-14 01:34:34 +01:00
Günther Deschner
2600cb6b9b Remove unused marshalling for LSA_ENUM_TRUST_DOM.
Guenther
(This used to be commit 90b07714dd)
2008-02-13 00:37:19 +01:00
Günther Deschner
76f654e21c Remove unused marshalling for LSA_PRIV_GET_DISPNAME.
Guenther
(This used to be commit d853f4f263)
2008-02-11 19:16:05 +01:00
Günther Deschner
0e4088e626 Let rpccli_lsa_open_policy[2] be convenience wrappers around their pidl equivalents.
Guenther
(This used to be commit 4ca3b1c02e)
2008-02-11 17:50:18 +01:00
Günther Deschner
1042b0ce37 Remove unused marshalling for LSA_ENUM_PRIVS.
Guenther
(This used to be commit 793e5a608b)
2008-02-11 10:49:35 +01:00
Günther Deschner
5c23f7d73c Remove unused marshalling for LSA_OPENACCOUNT.
Guenther
(This used to be commit bb8e77eb74)
2008-02-08 22:44:42 +01:00
Günther Deschner
ef01ceff89 Remove unused marshalling for LSA_CREATEACCOUNT.
Guenther
(This used to be commit c9a8baf507)
2008-02-08 22:38:34 +01:00
Günther Deschner
99a134a74e Remove unused marshalling for LSA_QUERY_INFO.
Guenther
(This used to be commit f193d7d944)
2008-02-08 10:26:37 +01:00
Günther Deschner
b13277ed4e Remove unused marshalling for LSA_QUERY_INFO2.
Guenther
(This used to be commit 0fac016d9d)
2008-02-08 10:16:08 +01:00
Günther Deschner
8a1f56a90e Remove rpccli_lsa_query_info_policy_new and rpccli_lsa_query_info_policy_new2.
Guenther
(This used to be commit 08888e3773)
2008-02-08 10:02:52 +01:00
Günther Deschner
a1c2242f3f Remove unused marshalling for LSA_QUERY_SEC_OBJ.
Guenther
(This used to be commit 9b2aeeb369)
2008-02-04 22:12:41 +01:00
Günther Deschner
c920764b19 Apply const to rpccli_lsa_query_info_policy() and rpccli_lsa_query_info_policy2().
Guenther
(This used to be commit 7a3fe68bef)
2008-01-15 16:40:22 +01:00
Günther Deschner
862e1685b8 Remove old lsa set info policy call.
Guenther
(This used to be commit b37b2b77ed)
2008-01-14 17:16:06 +01:00
Günther Deschner
08946cc546 Remove some more hand written LSA rpc.
(rpccli_lsa_open_trusted_domain,
rpccli_lsa_query_trusted_domain_info,
cli_lsa_query_domain_info_policy).

Guenther
(This used to be commit 5bfb33f1c5)
2008-01-14 15:29:52 +01:00
Günther Deschner
c939441411 Start removing hand-written lsa marshalling code (namely
rpccli_lsa_open_trusted_domain_by_name,
rpccli_lsa_query_trusted_domain_info_by_sid and
rpccli_lsa_query_trusted_domain_info_by_name).

Guenther
(This used to be commit f2fb347345)
2008-01-14 15:29:43 +01:00
Jeremy Allison
6b6655edd9 Remove pstrings from everything except srv_spoolss_nt.c.
Jeremy.
(This used to be commit 0002a9e96b)
2007-11-27 14:35:30 -08:00
Jeremy Allison
66298d8080 More pstring elimination.
Jeremy.
(This used to be commit 15074de938)
2007-11-20 17:18:16 -08:00
Jeremy Allison
922db25272 Fix a mismatched interface where we were using
uint32 instead of enum lsa_SidType.
Jeremy.
(This used to be commit 2df8252ff7)
2007-10-25 18:29:49 -07:00
Jeremy Allison
30191d1a57 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.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Gerald (Jerry) Carter
e5a951325a [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe9)
2007-10-10 15:34:30 -05:00
Michael Adam
88eda8245d r25254: Add my C - Michael
(This used to be commit 3246be8cf0)
2007-10-10 12:30:55 -05:00
Michael Adam
6f5869461c r25247: Rename the rpccli_lsa_lookup_sids_all() function to rpccli_lsa_lookup_sids()
and remove the old rpccli_lsa_lookup_sids() function. The old function would
fail due to server limits when requesting to resolve too many sids at once
(20480 for W2k3). The new version passes the list of sids in hunks to the
server. It has up to now been used (and tested) in the winbindd_ads
lookup_groupmem() function, and I think the time has come to replace the actual
function with this correct version.

Michael
(This used to be commit 1194d4f36e)
2007-10-10 12:30:54 -05:00
Michael Adam
0d1e7e97d3 r25226: Get rid of more red bars...
(This used to be commit aa603bcc6c)
2007-10-10 12:30:52 -05:00
Michael Adam
0ed9c5569a r25225: Add a debug message.
Michael
(This used to be commit 7238884c2c)
2007-10-10 12:30:52 -05:00
Michael Adam
c57da5d796 r25224: Fix a potential segfault in lsa_lookupsids client code due to
uninitialized data.

Michael
(This used to be commit b4fff6d09d)
2007-10-10 12:30:51 -05:00
Michael Adam
5bf7692997 r25223: Fix behaviour of rpccli_lsa_lookupsids_all() when
rpccli_lsa_lookupsids_noalloc() returns an error for one hunk
of SIDs: free all allocated arrays and return the error code
returned by the hunk lookup.

Michael
(This used to be commit 2c68ebd693)
2007-10-10 12:30:51 -05:00
Michael Adam
d86c441b46 r24784: Initialize uninitalized data to prevent segfaults.
Thanks to Volker for the hint!

Michael
(This used to be commit 3b7ed3ea88)
2007-10-10 12:30:21 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Günther Deschner
7eb828135b r23627: Allow to pass down the lookup-level to rpccli_lsa_lookup_names().
Guenther
(This used to be commit e9a7512a9f)
2007-10-10 12:23:38 -05:00
Jeremy Allison
2e6deee020 r23400: Fix lsa crash bug #4683. The "names" enum struct
in a lookup_sidX reply isn't optional - like the
lookup_sidX query it needs to be defined in the
struct.
All this will go away with PIDL (thank goodness....).
Jerry - I think this is a showstopper to be merged
for 3.0.25b.
I'll be watching the build farm to see if anything broke.
Jeremy.
(This used to be commit 9300b92f7a)
2007-10-10 12:23:13 -05:00
Michael Adam
cda3cf211b r23082: Ooops - that portion of the last checkin was by accident.
Before comitting that, I have to verify that it does not
break anything...

Michael
(This used to be commit 55ea93d47e)
2007-10-10 12:22:43 -05:00
Michael Adam
5d1755710a r23081: Reorder the lsa_lookup_sids functions so that the order makes more sense...
(This used to be commit 374dea8c6f)
2007-10-10 12:22:43 -05:00
Michael Adam
9d6fd22e27 r23073: In the internal rpccli_lsa_lookup_sids_noalloc(), use a temporary
talloc context for use with the actual rpc query and response.
So the the parent context does not get flooded by the posslibly
large amount of response data (when looking up a lot of sids).

Note: It not possible, to simply use the names and domains arrays
as talloc contexts for the talloc_strdup calls, because from
rpccli_lsa_lookup_sids_all, this is called with names + offset
and domains + offset where names and domains are talloced
arraye for the complete response.
(This used to be commit 8e60900c5c)
2007-10-10 12:22:18 -05:00
Michael Adam
87d30dc32d r23070: The lsa rpc lookup sids call has a maximum number of SIDS to be
looked up at one time. This limit is at 20480 for w2k3.
Our rpccli_lsa_lookup_sids function ignores this limit, so when
we give the server too long a list of SIDs, then we will get
nothing back. Since typically rpccli_lsa_lookup_sids is given
one SID  (or a small number of SIDS), this did not do harm
up to now. But since I want to use lsa_lookup_sids in a subsequent
modification to winbindd_ads.c:lookup_groupmem to get rid of
a vast number of dn_lookup calls to the server, I had to make
sure we do it correctly.

I have added a function rpccli_lsa_lookup_sids_all function
that has the same prototype but internally splits the list
of SIDs up into hunks of a (conservative, hard coded) 1000
SIDs each for a first go.

If this approach is agreed upon, the new function could replace
the original rpccli_lsa_lookup_sids function.

Michael
(This used to be commit 66ff0bc6c3)
2007-10-10 12:22:18 -05:00
Jeremy Allison
be8b0685a5 r22589: Make TALLOC_ARRAY consistent across all uses.
Jeremy.
(This used to be commit 8968808c3b)
2007-10-10 12:19:49 -05:00
Michael Adam
b851e8eb87 r22537: Use a (more speaking) macro when there is one.
(This used to be commit 2eec760154)
2007-10-10 12:19:43 -05:00
Gerald Carter
05ba38f754 r18747: replace rpccli_lsa_close() with rpccli_lsa_Close()
(This used to be commit 50d74ce048)
2007-10-10 12:00:54 -05:00
Jelmer Vernooij
4e7d11449a r18654: Rename "struct uuid" => "struct GUID" for consistency.
(This used to be commit 5de76767e8)
2007-10-10 11:52:19 -05:00
Gerald Carter
40892266f6 r18405: Now that POLICY_HND == struct policy_handle, we can
make rpccli_lsa_close() a real one line wrapper for
rpccli_lsa_Close().

I'm still keeping the wrapper for now because I'm not sure
what we will do about a usable client API.  I don't think
calling the autogenerated client code directly is a good idea
as the IDL is still evolving.
(This used to be commit 47f0c71218)
2007-10-10 11:51:22 -05:00
Gerald Carter
5e1146ab58 r18404: * swap from POLICY_HND to the struct policy_handle from ndr/misc.h
* move OUR_HANDLE macro to include/rpc_misc.h
(This used to be commit 2b37079af2)
2007-10-10 11:51:22 -05:00
Gerald Carter
e397e2f22a r18397: Change rpccli_lsa_close() as a wrapper for the autogenerated
rpccli_lsa_Close().
(This used to be commit 365c75603d)
2007-10-10 11:51:21 -05:00
Gerald Carter
2b27c93a9a r18271: Big change:
* autogenerate lsa ndr code
* rename 'enum SID_NAME_USE' to 'enum lsa_SidType'
* merge a log more security descriptor functions from
  gen_ndr/ndr_security.c in SAMBA_4_0

The most embarassing thing is the "#define strlen_m strlen"
We need a real implementation in SAMBA_3_0 which I'll work on
after this code is in.
(This used to be commit 3da9f80c28)
2007-10-10 11:51:18 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Jeremy Allison
2b8abc030b r16644: Fix bug #3887 reported by jason@ncac.gwu.edu
by converting the lookup_XX functions to correctly
return SID_NAME_TYPE enums.
Jeremy.
(This used to be commit ee2b2d96b6)
2007-10-10 11:19:05 -05:00
Volker Lendecke
ee4ee4c541 r16335: Fix Klocwork IDs 107 108 109 111 112 113 114 116 117 118 121
(This used to be commit 555984ea77)
2007-10-10 11:17:34 -05:00
Günther Deschner
655b04e4f8 r15041: Adding rpc client calls to manipulate auditing policies on remote CIFS
servers. Also add a new "net rpc audit" tool. The lsa query infolevels
were taken from samb4 IDL, the lsa policy flags and categories are
partly documented on msdn. I need to cleanup the double
lsa_query_info_policy{2}{_new} calls next.

Guenther
(This used to be commit 0fed66926f)
2007-10-10 11:15:59 -05:00
Jeremy Allison
ec4191fe98 r14784: Fix coverity bug #274. Null deref.
Jeremy.
(This used to be commit f88f2d9368)
2007-10-10 11:15:48 -05:00
Jeremy Allison
d3196b85c9 r13475: Fix erroneous initialization caused by my renaming types.
Jeremy.
(This used to be commit e8e2fc79b4)
2007-10-10 11:10:05 -05:00
Gerald Carter
0af1500fc0 r13316: Let the carnage begin....
Sync with trunk as off r13315
(This used to be commit 17e63ac4ed)
2007-10-10 11:06:23 -05:00
Günther Deschner
d93c2b1046 r11854: Remove unused DOM_SID.
Guenther
(This used to be commit 8609484ff6)
2007-10-10 11:05:30 -05:00
Jeremy Allison
ca551d55a8 r11336: Start to get my control back :-). Volker, I think
Andrew Bartlett is right - making lsa code do it the
netlogon way, not vica-versa.
Jeremy.
(This used to be commit f313757e36)
2007-10-10 11:05:13 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d7)
2007-10-10 11:04:48 -05:00
Gerald Carter
fed660877c r7415: * big change -- volker's new async winbindd from trunk
(This used to be commit a0ac9a8ffd)
2007-10-10 10:57:08 -05:00
Günther Deschner
4bc39f05b7 r7391: - Added client-support for various lsa_query_trust_dom_info-calls and a
rpcclient-tester for some info-levels.

  Jerry, I tried to adopt to prs_pointer() where possible and to not
  interfere with your work for usrmgr.

- Add "net rpc trustdom vampire"-tool.

  This allows to retrieve Interdomain Trust(ed)-Relationships from
  NT4-Servers including cleartext-passwords (still stored in the local
  secrets.tdb).

  The net-hook was done in cooperation with Lars Mueller
  <lmuelle@suse.de>.

  To vampire trusted domains simply call:

        net rpc trustdom vampire -S nt4dc -Uadmin%pass

Guenther
(This used to be commit 5125852939)
2007-10-10 10:57:07 -05:00
Gerald Carter
b137b7cc47 r6228: remove BUFHDR2 and clean up LsaEnumTrustedDomains()
Tested client and server code.
(This used to be commit efb3ac4c69)
2007-10-10 10:56:30 -05:00
Gerald Carter
0aa89db947 r6071: * clean up UNISTR2_ARRAY ( really just an array of UNISTR4 + count )
* add some backwards compatibility to 'net rpc rights list'
* verify privilege name in 'net rpc rights privileges <name>' in order
  to give back better error messages.
(This used to be commit 0e29dc8aa3)
2007-10-10 10:56:20 -05:00
Gerald Carter
66df8431ec r5726: merge LsaLookupPrivValue() code from trunk
(This used to be commit 277203b535)
2007-10-10 10:55:57 -05:00
Gerald Carter
b3757eadf0 r4849: * finish SeAddUsers support in srv_samr_nt.c
* define some const SE_PRIV structure for use when
  you need a SE_PRIV* to a privilege
* fix an annoying compiler warngin in smbfilter.c
* translate SIDs to names in 'net rpc rights list accounts'
* fix a seg fault in cli_lsa_enum_account_rights caused by
  me forgetting the precedence of * vs. []
(This used to be commit d25fc84bc2)
2007-10-10 10:53:59 -05:00
Gerald Carter
cf85715319 r4821: finish off 'net rpc rights [list|grant|revoke]'
one small todo item is to add a 'accounts' sub option
to 'net rpc list' so enumerate all privileged SIDs
and their associated rights.
(This used to be commit bf4385c79a)
2007-10-10 10:53:56 -05:00
Gerald Carter
c3ba8b9a53 r4736: small set of merges from rtunk to minimize the diffs
(This used to be commit 4b351f2fcc)
2007-10-10 10:53:52 -05:00
Gerald Carter
d94d87472c r4724: Add support for Windows privileges in Samba 3.0
(based on Simo's code in trunk).  Rewritten with the
following changes:

* privilege set is based on a 32-bit mask instead of strings
  (plans are to extend this to a 64 or 128-bit mask before
   the next 3.0.11preX release).
* Remove the privilege code from the passdb API
  (replication to come later)
* Only support the minimum amount of privileges that make
  sense.
* Rewrite the domain join checks to use the SeMachineAccountPrivilege
  instead of the 'is a member of "Domain Admins"?' check that started
  all this.

Still todo:

* Utilize the SePrintOperatorPrivilege in addition to the 'printer admin'
  parameter
* Utilize the SeAddUserPrivilege for adding users and groups
* Fix some of the hard coded _lsa_*() calls
* Start work on enough of SAM replication to get privileges from one
  Samba DC to another.
* Come up with some management tool for manipultaing privileges
  instead of user manager since it is buggy when run on a 2k client
  (haven't tried xp).  Works ok on NT4.
(This used to be commit 77c10ff9aa)
2007-10-10 10:53:51 -05:00
Volker Lendecke
f4ec52a097 r4561: This looks a lot larger than it is, this is to reduce the clutter on future
patches.

Pass down the pipe_idx down to all functions in cli_pipe where nt_pipe_fnum is
referenced. First step towards having multiple pipes on a cli_struct. The idea
is to not have a single nt_pipe_fnum but an array for the pipes we support.

Volker
(This used to be commit 93eab05020)
2007-10-10 10:53:47 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Gerald Carter
8ad3d8c9b0 r196: merging struct uuid from trunk
(This used to be commit 911a28361b)
2007-10-10 10:51:13 -05:00
Andrew Bartlett
7d068355aa This merges in my 'always use ADS' patch. Tested on a mix of NT and ADS
domains, this patch ensures that we always use the ADS backend when
security=ADS, and the remote server is capable.

The routines used for this behaviour have been upgraded to modern Samba
codeing standards.

This is a change in behaviour for mixed mode domains, and if the trusted
domain cannot be reached with our current krb5.conf file, we will show
that domain as disconnected.

This is in line with existing behaviour for native mode domains, and for
our primary domain.

As a consequence of testing this patch, I found that our kerberos error
handling was well below par - we would often throw away useful error
values.  These changes move more routines to ADS_STATUS to return
kerberos errors.

Also found when valgrinding the setup, fix a few memory leaks.

While sniffing the resultant connections, I noticed we would query our
list of trusted domains twice - so I have reworked some of the code to
avoid that.

Andrew Bartlett
(This used to be commit 7c34de8096)
2004-01-08 08:19:18 +00:00
Andrew Bartlett
614c18d24b rpc_client/cli_lsarpc.c:
rpc_parse/parse_lsa.c:
nsswitch/winbindd_rpc.c:
nsswitch/winbindd.h:
 - Add const

libads/ads_ldap.c:
 - Cleanup function for use

nsswitch/winbindd_ads.c:
 - Use new utility function ads_sid_to_dn
 - Don't search for 'dn=', rather call the ads_search_retry_dn()

nsswitch/winbindd_ads.c:
include/rpc_ds.h:
rpc_client/cli_ds.c:
 - Fixup braindamage in cli_ds_enum_domain_trusts():
    - This function was returning a UNISTR2 up to the caller, and
      was doing nasty (invalid, per valgrind) things with memcpy()
    - Create a new structure that represents this informaiton in a useful way
      and use talloc.

Andrew Bartlett
(This used to be commit 06c3f15aa1)
2004-01-05 02:04:37 +00:00
Volker Lendecke
57c1a70451 In cli_lsa_lookup_sids don't leave the domain field uninitialized if
some sid could not be mapped. Otherwise this call is unnecessarily
complicated to call.

Volker
(This used to be commit 1337338522)
2003-10-22 07:29:18 +00:00
Simo Sorce
b1f610ebb1 split some security related functions in their own files.
(no need to include all of smbd files to use some basic sec functions)

also minor compile fixes
couldn't compile to test these due to some kerberos problems wirh 3.0,
but on HEAD they're working well, so I suppose it's ok to commit
(This used to be commit c78f2d0bd1)
2003-10-06 01:38:46 +00:00
Tim Potter
1788f806e7 Merge: const fixes.
(This used to be commit a20aba0999)
2003-02-25 23:51:56 +00:00
Jeremy Allison
438b5c92d4 Merge tridge's client priv code from HEAD.
Jeremy
(This used to be commit 49739be1e2)
2003-01-29 02:24:12 +00:00
Jeremy Allison
734c6d8a51 Merging tridge's privillage client changes from HEAD.
Jeremy.
(This used to be commit 30a33920b4)
2003-01-28 21:09:56 +00:00
Gerald Carter
4242eda183 merging some rpcclient and net functionality from HEAD
(This used to be commit 7a4c874842)
2003-01-15 17:22:48 +00:00
Gerald Carter
36ef82a529 merge of new client side support the Win2k LSARPC UUID in rpcbind
from APP_HEAD
(This used to be commit 1cfd2ee433)
2002-10-04 04:10:23 +00:00
Jim McDonough
ae6cb0fb31 Add lsa 0x2e (queryinfo2) client side
(This used to be commit c3b05b21a0)
2002-08-12 13:40:59 +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 e358d7b24c)
2002-08-05 02:47:46 +00:00
Tim Potter
e9360f1a45 Moved rpc client routines from libsmb back to rpc_client where they belong.
(This used to be commit cb946b5dad)
2002-08-02 07:20:56 +00:00
Jeremy Allison
e74c51dfeb I *love* removing code :-). Removed 4 files that weren't being used.
All this stuff was being pulled in due to *one* unneeded call to
fetch a domain SID which smbpasswd already puts in the database...
Jeremy.
(This used to be commit 6bf2505cce)
2001-11-16 18:32:32 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Andrew Tridgell
19fea3242c the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
(This used to be commit dcd6e735f7)
2001-09-04 07:13:01 +00:00
Andrew Tridgell
b031af348c converted another bunch of stuff to NTSTATUS
(This used to be commit 1d36250e33)
2001-08-27 19:46:22 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Andrew Tridgell
7e82811d2d fixed some uninitialised variables
(This used to be commit 5d899e51a4)
2001-05-01 04:05:53 +00:00
Jeremy Allison
00ab9021b0 Serious (and I *mean* serious) attempt to fix little/bigendian RPC issues.
We were reading the endainness in the RPC header and then never propagating
it to the internal parse_structs used to parse the data.
Also removed the "align" argument to prs_init as it was *always* set to
4, and if needed can be set differently on a case by case basis.
Now ready for AS/U testing when Herb gets it set up :-).
Jeremy.
(This used to be commit 0cd37c831d)
2001-03-09 23:48:58 +00:00
Jeremy Allison
393bede7db Sync up handle creation with 2.2 branch. We can now join AS/U domains and
authenticate against them. Big/little endian issues fixed.
Jeremy.
(This used to be commit 0e6a34510e)
2001-03-07 23:59:13 +00:00
Jeremy Allison
369f5fd1d7 Fixed memory leaks in lsa_XX calls. Fixed memory leaks in smbcacls. Merged
in fixes from appliance-head and 2.2. Fixed multiple connection.tdb open
problem.
Jeremy.
(This used to be commit 0a40bc83e1)
2000-12-15 01:02:11 +00:00
Tim Potter
e43671cd57 Wrong length for unistr2 in init_q_lookup_names()
Removed some more static arrays and replaced with tallocated memory
blocks.
(This used to be commit 1db0f31ae0)
2000-12-13 11:53:37 +00:00
Tim Potter
b9c9e5d145 Fixed some accidentally reversed patches.
(This used to be commit fa604bc85e)
2000-12-12 05:58:34 +00:00
Jeremy Allison
20ac3fc77e Merged in Tim's changes : Removed static limit of MAX_LOOKUP_SIDS in rpc server and client
lsa_lookup_names() and lsa_lookup_sids().
Jeremy.
(This used to be commit 9e9c71c8b3)
2000-12-12 02:45:11 +00:00
Tim Potter
e15921110a Removed a dead function.
(This used to be commit 4c8ce7af46)
2000-12-08 03:57:50 +00:00
Tim Potter
3478427f2e Port of lsa_lookup_sids() and lsa_lookup_names() rpc client functions from
TNG branch.

Re-instated lsa_lookup_sids and lsa_lookup_names functions in rpcclient.

This requires most samba binaries to link in another handful of object
files due to uncessary coupling between modules.  )-:
(This used to be commit 817819d0cc)
2000-12-08 03:34:00 +00:00