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

53 Commits

Author SHA1 Message Date
Herb Lewis
aa39cc37da get rid of more compiler warnings
(This used to be commit 398bd14fc6e2f8ab2f34211270e179b8928a6669)
2003-08-15 04:42:05 +00:00
Gerald Carter
b1fc491251 make sure to initialize the backend methods when enumerating sequence numbers; reported by Ken Cross
(This used to be commit 10c7a1af67e556c17d4b3495934a2dad19728d77)
2003-08-02 18:15:33 +00:00
Gerald Carter
0d087e3ba2 working on transtive trusts issue:
* use DsEnumerateDomainTrusts() instead of LDAP search.
    wbinfo -m now lists all trusted downlevel domains and
    all domains in the forest.

Thnigs to do:

  o Look at Krb5 connection trusted domains
  o make sure to initial the trusted domain cache as soon
    as possible
(This used to be commit 0ab00ccaedf204b39c86a9e1c2fcac5f15d0e033)
2003-07-31 05:43:47 +00:00
Gerald Carter
3a5dc7c2ec convert snprintf() calls using pstrings & fstrings
to pstr_sprintf() and fstr_sprintf() to try to standardize.
lots of snprintf() calls were using len-1; some were using
len.  At least this helps to be consistent.
(This used to be commit 9f835b85dd38cbe655eb19021ff763f31886ac00)
2003-07-23 12:33:59 +00:00
Gerald Carter
c674e411c7 i guess i'm the only one this ever annyoed...
fix the confusion when we tdb_lock_bystring() but
we retrieve an entry using tdb_fetch_by_string.
It's now always tdb.*bystring()
(This used to be commit 66359531b89368939f0e8f584a45844b5f2f99e7)
2003-07-10 20:37:01 +00:00
Jeremy Allison
ce72beb2b5 Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings.
Jeremy.
(This used to be commit ff222716a08af65d26ad842ce4c2841cc6540959)
2003-07-03 19:11:31 +00:00
Jeremy Allison
45f472ba21 Sequence number was not getting updated with ldap hack. Only a bug in this
branch.
Jeremy.
(This used to be commit 19629b41cb9b5e5f9e0d4a6d52af983a4d05c8cb)
2003-06-24 23:07:26 +00:00
Gerald Carter
81d8eefc0d * set domain->last_status = NT_STATUS_SERVER_DISABLED on an ads_connect() failure
* Fix code to use winbind_rpc methods for trusted mixed mode or NT4 domains
  ( does no one ever test this? )
* add in LDAP code to get the sequence number for rpc based seqnum update.
  ( this is needed if the DC is upgraded and samba is not reconfigured
    to use security = ads; it's not pretty but it works (from app_head) )
* fix bug that caused us to enumerate domain local groups in domains
  other than our own
(This used to be commit 14f2cd139a22454571cea8475d3b7c5c2787d378)
2003-06-23 05:10:07 +00:00
Gerald Carter
93bcb9963b merge of the netsamlogon caching code from APPLIANCE_HEAD
This replaces the universal group caching code (was originally
based on that code).  Only applies to the the RPC code.

One comment: domain local groups don't show up in 'getent group'
that's easy to fix.

Code has been tested against 2k domain but doesn't change anything
with respect to NT4 domains.

netsamlogon caching works pretty much like the universal group
caching code did but has had much more testing and puts winbind
mostly back in sync between branches.
(This used to be commit aac01dc7bc95c20ee21c93f3581e2375d9a894e1)
2003-06-21 04:05:01 +00:00
Jeremy Allison
3ef930a8e9 Add in rety loop for query_user_list (from APP_HEAD). Deals with a bug
using MSRPC backend and should be safe with ldap backend.
Jeremy.
(This used to be commit 67535329a2df8986c2d1d85e25cd5c558ee61405)
2003-06-10 22:11:30 +00:00
Andrew Tridgell
057ec70b53 - fixed the bug that forced us not to use the winbindd cache when we
have a primary ADS domain and a secondary (trusted) NT4 domain. This
  caused winbindd to be *really* slow for that setup.

- fixed winbindd_getgrgid(), which was calling uid_to_sid instead of
  gid_to_sid(). When you make changes to winbind *PLEASE* test using
  nsstest.
(This used to be commit cdd9b60a078b63e22f543d4c8d0956ff536f4d89)
2003-06-10 03:50:38 +00:00
Jeremy Allison
2783e6f4f4 Instrument cache with debug statements so I can have a clue as to what
is going on in remote large sites.
Jeremy.
(This used to be commit 5987dad1f1049f08bf4a94929f70b5eac96c7007)
2003-06-10 00:49:43 +00:00
Gerald Carter
c384f2dcc7 * set winbind cache time to 5 minutes
* quit obsessing over the sequence number so much
* share the updated sequence number between parent
  and child winbindd processes in dual mode
(This used to be commit 6f99cafa95b2a9dc98d8272fe6a54e9d37098340)
2003-06-03 16:02:33 +00:00
Simo Sorce
c823b191ab And finally IDMAP in 3_0
We really need idmap_ldap to have a good solution with ldapsam, porting
it from the prvious code is beeing made, the code is really simple to do
so I am confident it is not a problem to commit this code in.

Not committing it would have been worst.
I really would have been able to finish also the group code, maybe we can
put it into a followin release after 3.0.0 even if it may be an upgrade
problem.

The code has been tested and seem to work right, more testing is needed for
corner cases.

Currently winbind pdc (working only for users and not for groups) is
disabled as I was not able to make a complete group code replacement that
works somewhat in a week (I have a complete patch, but there are bugs)

Simo.
(This used to be commit 0e58085978f984436815114a2ec347cf7899a89d)
2003-05-12 18:12:31 +00:00
Andrew Bartlett
1a9394195d Merge HEAD's winbind into 3.0.
This includes the 'SIDs Rule' patch, mimir's trusted domains cacheing code,
the winbind_idmap abstraction (not idmap proper, but the stuff that held up
the winbind LDAP backend in HEAD).

Andrew Bartlett
(This used to be commit d4d5e6c2ee6383c6cceb5d449aa2ba6c83eb0666)
2003-04-23 11:54:56 +00:00
Jeremy Allison
e3522b2123 Fix spelling of background_process.
Jeremy.
(This used to be commit 2006e36c18bb2d5e44179829c66934efad38b0c7)
2002-10-15 21:34:42 +00:00
Gerald Carter
bfa93735ab merge from APP_HEAD of winbindd's domain local group fix
(This used to be commit 09c6f6329d6ae9327b7ef06de0ea78d24d805456)
2002-10-08 18:32:42 +00:00
Jelmer Vernooij
b2edf254ed sync 3.0 branch with head
(This used to be commit 3928578b52cfc949be5e0ef444fce1558d75f290)
2002-08-17 17:00:51 +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
Jeremy Allison
464c120197 Fix up conversion code from old winbindd versions (some testing needed).
Added time based cache size check (#ifdef'ed out by default, just didn't
want to lose the code).
Jeremy.
(This used to be commit b2350ed36c42827c417ea4a3dd0668a4a631a090)
2002-04-04 03:03:39 +00:00
Andrew Tridgell
0800ce3269 enable locking on the winbindd cache tdb so it can be backed up and
manipulated externally
(This used to be commit 1ad1a025b3fe5aeff5adf685f47c9cc05ef80e40)
2002-03-15 09:21:28 +00:00
Andrew Tridgell
391db465c6 removed bogus prepend_domain() call which was screwing up getpwuid()
with the new default domain code
(This used to be commit 0f75b6bd5b42f745f17e2e6624d5d541a30ee897)
2002-03-09 21:12:25 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-30 06:08:46 +00:00
Andrew Tridgell
13059beb24 force the time difference in cache comparisons to be unsigned to cope
with the local machine time changing
(This used to be commit 116c0a0e3baa6a100a816f1ff2722782941ac3dc)
2002-01-11 10:05:34 +00:00
Andrew Tridgell
35623dac54 make the winbind sequence number code more robust
when switching from rpc to ADS this now should make sense
(This used to be commit ec73d26c7f9a2bbd4b91e9c22850e032b91666e2)
2002-01-11 10:02:28 +00:00
Andrew Tridgell
a062e58d9e - added initial support for trusted domains in winbindd_ads
- gss error code patch from a.bokovoy@sam-solutions.net
- better sid dumping in ads_dump
- fixed help in wbinfo
(This used to be commit ee1c3e1f044b4ef62169ad74c5cac40eef81bfda)
2001-12-19 08:44:23 +00:00
Andrew Tridgell
d033e53300 removed the start_ndx parameter from group enumeration
I tried testing this by lowering the buffer size in
cli_samr_enum_dom_groups() but that didn't work - I think this needs
more looking into
(This used to be commit 34328e30315e4b42087d0ee11ed0c3fb715bc250)
2001-12-11 01:04:13 +00:00
Andrew Tridgell
abeb0f50ea got rid of start_ndx from query_user_list()
(This used to be commit 1c909afe76566807fb576c965eb869f98e72f2bd)
2001-12-11 00:03:58 +00:00
Andrew Tridgell
2bbc91978b winbindd backends can now be marked "consistent" or "inconsistent"
consistent backends (like ADS) always give correct primary group
info, so we can play cache tricks to speed things up a lot

inconsistent backends (like MSRPC) need to fetch stuff more often
(This used to be commit 217c39f23282e20f96a61a0d5a2434b3f5f66a86)
2001-12-10 06:05:21 +00:00
Andrew Tridgell
a23800be19 shrank the winbindd_cache.tdb somewhat
on my system it now uses 132k for 308 users
(This used to be commit 2b396f9172bb4c2d1d9216d724a1aaab8bb22ba8)
2001-12-10 05:20:55 +00:00
Andrew Tridgell
7f3373649a added some comments
(This used to be commit 34589d5a4786b7e441efecaef0575f9eaa0d7edf)
2001-12-10 02:30:18 +00:00
Andrew Tridgell
f3918919d2 moved the domain sid lookup and enumeration of trusted domains into
the backends

at startup, loop until we get the domain sid for our primary domain,
trying every 10 seconds. This makes winbindd handle a room-wide power
failure better
(This used to be commit 7c60ae59378be1b2af2e57ee3927966a29a797a5)
2001-12-10 02:25:19 +00:00
Andrew Tridgell
e051c2c430 make sid_binstring available without HAVE_ADS
(This used to be commit 4a6d29768665f71b72cf48ee34ee9a9c451232f6)
2001-12-10 00:39:01 +00:00
Andrew Tridgell
4ad81e7714 explicitly encode NULL strings in the cache
(This used to be commit 77c1376456765a7afe90afad96fab819fdcf8af3)
2001-12-10 00:07:51 +00:00
Andrew Tridgell
cb1195fdef removed a debug line
(This used to be commit ec4c90fd7f56f8870884e5a27622cae71d154eca)
2001-12-10 00:00:44 +00:00
Andrew Tridgell
31842f5d01 completely new winbindd cache infrastructure
this one looks like just another winbind backend, and has the
following properties:

- does -ve and +ve cacheing of all queries

- can be disabled with -n switch to winbindd

- stores all records packed, so even huge domains are not a problem
for a complete cache

- handles the server being down

- uses sequence numbers for all entries

This fixes a lot of problems with winbindd. Serving from cache is now
*very* fast.
(This used to be commit fddb4f4c04473a60a97212c0c8e143d6a4d68380)
2001-12-09 23:59:42 +00:00
Andrew Tridgell
addea9645d moved the sequence number fetch into the backend, and fetch the
sequence number via ldap when using ads
(This used to be commit 9a084f0bb91883224ad44e2b76417d10c15cce42)
2001-12-05 07:52:44 +00:00
Andrew Tridgell
c868fe502b added name_to_sid to the backend
(This used to be commit 816e40a51af80a7f703c0451304de406deab3dd8)
2001-12-03 08:17:46 +00:00
Jeremy Allison
ee58402ac4 Added debugs to track down sequence lookup problems.
Jeremy.
(This used to be commit d3f5d5a4aca0d5bc8c4db7dfa8b766b7cda808eb)
2001-11-22 07:24:07 +00:00
Jeremy Allison
efa52853f6 Preparing to implement +ve and -ve caching for lookupname/lookupsid calls.
Jeremy.
(This used to be commit 1f6cc536b2db0c36feee45cfd6ac1ad5ee8fb05a)
2001-11-21 08:36:43 +00:00
Tim Potter
c32b4b6161 Caching user, group and domain sam handles was a stupid idea.
Now we just keep a record of the open pipes.
(This used to be commit 77c287e9460eed7bde7004c7e6c8cb0099c6ba6f)
2001-11-15 06:55:56 +00:00
Tim Potter
b7f6113c2d Random connection robustness related fixes. Display some debugs about
the currently open connections when winbindd receives a USR1 signal.

Hmm - I've just realised this will conflict with the messaging code
but we don't use that yet.
(This used to be commit caef54e40081477609a824185949ddf6db6ba363)
2001-11-14 06:18:13 +00:00
Tim Potter
1bce5c0b62 Resurrected sam sequence number code.
Pass domain structure around in cache code rather than the domain name.

Some misc reformatting to make things look prettier.
(This used to be commit 295dd2a5817b5d7c40474b9e460f3515e8c8e449)
2001-10-14 08:26:45 +00:00
Tim Potter
482a9ef278 This is the start of a bit of a rewrite of winbindd's connection handling.
I've wrapped up all the decisions about managing, making and closing
connections into a connection manager in nsswitch/winbindd_cm.c.

It's rather incomplete at the moment - only querying basic user info works
at the moment (i.e finger -m DOMAIN/user) and everything else is broken.

Jeremy, please take a look and I'll start moving across the rest of
winbindd to this new system.
(This used to be commit c369cf5af787ed9c642778d21f162716fbf0620e)
2001-10-05 00:20:06 +00:00
Simo Sorce
b50d10c2a3 move to SAFE_FREE()
(This used to be commit 03dc67788f68c9e01b5a82fdf43f837cb19f4608)
2001-09-17 04:52:45 +00:00
Andrew Tridgell
05fc3e578c use LDSHFLAGS not -shared in several places
(This used to be commit 8ec9c87b5d1a7dae17d5b1a30f58effaf5e69e4b)
2001-06-04 05:13:59 +00:00
Tim Potter
a36f9250e7 Preliminary merge of winbind into HEAD. Note that this compiles and links
but I haven't actually run it yet so it probably doesn't work.  (-:
(This used to be commit 59f95416b66db6df05289bde224de29c721978e5)
2001-05-07 04:32:40 +00:00
Jeremy Allison
f9a15ce1a6 Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
(This used to be commit 94747b4639ed9b19f7d0fb896e43aa392a84989a)
2001-04-08 20:22:39 +00:00
David O'Neill
3380ffae9c Changes from APPLIANCE_HEAD:
testsuite/printing/psec.c
        - Use lock directory from smb.conf parameter when peeking at the
          ntdrivers.tdb file.
    source/rpc_parse/parse_sec.c
        - fix typo in debug message
    source/script/installbin.sh
        - create private directory as part of 'make install'.
    source/nsswitch/winbindd_cache.c
    source/nsswitch/winbindd_idmap.c
    source/passdb/secrets.c
    source/smbd/connection.c
        - always convert tdb key to unix code-page when generating.
    source/printing/nt_printing.c
        - always convert tdb key to unix code-page when generating.
        - don't prepend path to a filename that is NULL in
          add_a_printer_driver_3().
    source/rpc_server/srv_spoolss_nt.c
        - always convert tdb key to unix code-page when generating.
        - don't prepend server name to a path/filename that is NULL in the
          fill_printer_driver_info functions.
    source/printing/printing.c
        - always convert tdb key to unix code-page when generating.
        - move access check for print_queue_purge() outside of job delete
          loop.
    source/smbd/unix_acls.c
        - fix for setting ACLs (this got missed earlier)
    source/lib/messages.c
        - trivial sync with appliance_head
(This used to be commit 376601d17d53ef7bfaafa576bd770e554516e808)
2001-01-11 20:41:19 +00:00
Tim Potter
4cdc54ba24 While we're all making incompatible tdb changes, I changed the implementation
of tdb_{store,get}_int() to store the length of the string key + 1 so the
stored key contains the trailing NULL character.  This allows normal
string library routines to manipulate keys.

Also renamed tdb_get_int() to tdb_fetch_int() to keep the set of verbs
consistent.
(This used to be commit a423c7c5f21dc4046530b85482dee88dcfcbf070)
2000-05-12 06:27:35 +00:00