1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
Commit Graph

6394 Commits

Author SHA1 Message Date
Jeremy Allison
775c3876db RAP error strings take precedence as they are not encoded in the SMB header
(ie. the call can succeed, but still be an encoded error).
Jeremy.
(This used to be commit 3c68b94199)
2001-12-10 19:18:56 +00:00
Jim McDonough
3bc9ef34b1 Delay gssapi header checking until after kerberos has been located. Wasn't working on RedHat systems because of /usr/kerberos install location.
(This used to be commit 55d55e311e)
2001-12-10 18:07:17 +00:00
Jean-François Micouleau
0ff1a9568b added info level 3 to samrgetgroupinfo. I don't know what the value is.
It's just to keep usermanager happy ;-)

clean up a bit samr_query_aliasinfo to return the group description

added: samr_del_aliasmem, samr_del_groupmem and samr_del_domuser

with the correct scripts, you can now entirely manage the users from
usermanager ! Closer to full PDC every day ;-)

        J.F.
(This used to be commit 0a727afc66)
2001-12-10 15:03:16 +00:00
Martin Pool
769a9dbb00 Make proto
(This used to be commit 83ab28a7e5)
2001-12-10 08:36:42 +00:00
Martin Pool
6f151481da Doc.
(This used to be commit 6c684c89a4)
2001-12-10 07:29:34 +00:00
Martin Pool
ebc1f6fda3 Allow for internal databases which may have no name.
(This used to be commit caa08bb56e)
2001-12-10 07:27:20 +00:00
Martin Pool
dd9bdec3aa Log more error messages.
(This used to be commit 8118676f78)
2001-12-10 07:02:58 +00:00
Martin Pool
98d6d8cf9c Log more error messages.
(This used to be commit b50e566ab9)
2001-12-10 07:02:24 +00:00
Martin Pool
43069e5475 Also show LDFLAGS/LDSHFLAGS when starting compilation, because they're
not visible later on.
(This used to be commit 8edd29e099)
2001-12-10 06:23:28 +00:00
Andrew Tridgell
6b36fa3a8a use objectCategory instead of objectClass for faster searching
(This used to be commit 4d3b827e5a)
2001-12-10 06:21:44 +00:00
Tim Potter
31f036b5b3 Merge of memory leak fixes from APPLIANCE_TNG.
(This used to be commit b198de92d2)
2001-12-10 06:21:18 +00:00
Martin Pool
8c31fd48c8 Allocate tdb name up front in case log functions want to use it.
(This used to be commit a228c7efcc)
2001-12-10 06:09:42 +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 217c39f232)
2001-12-10 06:05:21 +00:00
Martin Pool
ddeecec1f8 tdb_open_ex: More cleanups: just dynamically allocate the TDB_CONTEXT
up front, rather than working on the stack and then copying across.
(This used to be commit b1d7d80068)
2001-12-10 05:29:47 +00:00
Martin Pool
dddef5d5b2 Refactor code to check whether already open into its own function.
(This used to be commit 52ef112e10)
2001-12-10 05:22:04 +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 2b396f9172)
2001-12-10 05:20:55 +00:00
Martin Pool
77d800fb3e tdb_open_ex should always "goto fail" in case of error, rather than
just returning.  I don't think this would leak at the moment, but it's
an accident waiting to happen.
(This used to be commit fe901ec194)
2001-12-10 05:12:52 +00:00
Martin Pool
70f27f1b52 Doc.
(This used to be commit bb6c0df4bc)
2001-12-10 05:08:22 +00:00
Martin Pool
5fea33ab58 tdb_open_ex: Continue previous refactoring so that we consistently
just say "tdb" not "&tdb".
(This used to be commit fac685d30f)
2001-12-10 05:05:21 +00:00
Tim Potter
4f53486d78 Added client and server code for the GetPrintProcessorDirectory SPOOLSS
rpc.  This was supposed to fix a printer driver download bug but it didn't
but it seemed a shame to trash all this code so I'm commiting it #ifdef'ed
out in case someone needs it one day.
(This used to be commit bef4365647)
2001-12-10 05:03:17 +00:00
Martin Pool
ce654f5e55 tdb_open_ex: Refactor to use a pointer to tdb, rather than an auto
tdb, to be consistent with the rest of the code.
(This used to be commit d159415049)
2001-12-10 05:00:36 +00:00
Tim Potter
aeb734a8fa Formatting fixup.
(This used to be commit d902baf709)
2001-12-10 04:59:17 +00:00
Martin Pool
5788615e8d Explain why snprintf has to be overridden in this way.
(This used to be commit a4cc69d945)
2001-12-10 04:35:01 +00:00
Martin Pool
5e22f65d00 (merge 1.130.4.93) Display results of checks for shared libraries.
(This used to be commit d7853d9937)
2001-12-10 04:29:14 +00:00
Tim Potter
ba57d9a136 Typo spotting.
(This used to be commit 62dfda654b)
2001-12-10 04:15:58 +00:00
Andrew Tridgell
216f3ae908 cleanup a little namespace pollution
(This used to be commit e5b484451a)
2001-12-10 03:21:38 +00:00
Andrew Tridgell
7f3373649a added some comments
(This used to be commit 34589d5a47)
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 7c60ae5937)
2001-12-10 02:25:19 +00:00
Andrew Tridgell
dd0b65a91c added some comments
(This used to be commit 5ab2c8b821)
2001-12-10 01:05:50 +00:00
Andrew Tridgell
e051c2c430 make sid_binstring available without HAVE_ADS
(This used to be commit 4a6d297686)
2001-12-10 00:39:01 +00:00
Andrew Tridgell
4ad81e7714 explicitly encode NULL strings in the cache
(This used to be commit 77c1376456)
2001-12-10 00:07:51 +00:00
Andrew Tridgell
cb1195fdef removed a debug line
(This used to be commit ec4c90fd7f)
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 fddb4f4c04)
2001-12-09 23:59:42 +00:00
Andrew Tridgell
e3d171ff55 add smb_xvasprintf() panic wrapper around vasprintf
(This used to be commit fa1e7a62ac)
2001-12-09 23:56:07 +00:00
Motonobu Takahashi
f13f9940b7 added fr.msg from Fanch
(This used to be commit 3a3b3469e6)
2001-12-09 17:06:45 +00:00
Andrew Tridgell
bd062b1856 added a simple tdbdump utility
(This used to be commit c4f5a6c65d)
2001-12-09 07:49:20 +00:00
Andrew Tridgell
adbd4300fd set return value to total errors
(This used to be commit 4a7e1f6bb1)
2001-12-09 07:18:59 +00:00
Andrew Tridgell
1445184502 better error checking in nsstest
(This used to be commit 3c17c64e31)
2001-12-09 06:51:27 +00:00
Andrew Tridgell
82516cad1b - check for correct error codes
- handle no initgroups fn
(This used to be commit 84a3390eac)
2001-12-09 06:10:40 +00:00
Andrew Tridgell
0b33cb1a7b - use accountype not accountcontrol
- better debug code
(This used to be commit 01f63b9c92)
2001-12-09 06:10:02 +00:00
Andrew Tridgell
b6c618467d fixed type passed to ads_search
(This used to be commit 0ff30848f3)
2001-12-09 00:46:37 +00:00
Andrew Tridgell
bc26ea1e5c fixed used of string after free
(This used to be commit f7ead035eb)
2001-12-09 00:45:51 +00:00
Jean-François Micouleau
6490fbce6b small comment I don't want to loose.
J.F.
(This used to be commit a0b5ae5822)
2001-12-08 23:57:35 +00:00
Jean-François Micouleau
139c46eced Fix domain logon that I broke 3 days ago.
And it's in sync with the docs, %U is really replaced by the name the user
asked. Whereas in 2.2 that's false, %U is replaced by the name the user
was mapped to.

	J.F.
(This used to be commit 39f2b23347)
2001-12-08 23:56:58 +00:00
Andrew Bartlett
a211fde02b By popular demand: a new config.guess and config.sub
(I hope I did this right)

Andrew Bartlett
(This used to be commit 75d0f4cf19)
2001-12-08 17:37:59 +00:00
Andrew Tridgell
09b01cdcbd check for gssapi_generic.h
(This used to be commit 838fbac7a0)
2001-12-08 12:06:08 +00:00
Andrew Tridgell
35eb6be4ea fix a DEBUG() line
(This used to be commit 18da530293)
2001-12-08 12:00:27 +00:00
Andrew Tridgell
5d378a280f added internal sasl/gssapi code. This means we are no longer dependent on cyrus-sasl which makes the code much less fragile. Also added code to auto-determine the server name or realm
(This used to be commit 435fdf276a)
2001-12-08 11:18:56 +00:00
Andrew Bartlett
22a76a0632 Fix segfault, and add a comment.
(This used to be commit ff91131ef9)
2001-12-08 02:25:25 +00:00
Andrew Bartlett
3c64bd4c50 Leak less memory.
Now, is there any reason that the prs_init() doesn't use the talloc context
that it is supplied as an argument for the actual data buffer?

It would seem logical to replace the malloc with a talloc, but I'm sure
there is some method to the madness (extrnal use/Reallocing of it I presume)

Andrew Bartlett
(This used to be commit ad18f33bfa)
2001-12-08 02:14:56 +00:00
Andrew Bartlett
9220fd730c Ensure that 'use spnego' restricts, rather than just advises our clients.
This means that if a hole is found in the spnego code, we can tell people
to just set 'use spengo' in their config file while we sort it out.

Other than that, preventing 'unusual' behaviour is always a good thing.

Andrew Bartlett
(This used to be commit a8a53c08f7)
2001-12-08 02:12:17 +00:00
Herb Lewis
7218f88e81 include/build_env.h wasn't getting built by default with new rules unless
you did make headers - fixed
(This used to be commit ce84993e8e)
2001-12-07 01:01:28 +00:00
Andrew Tridgell
99c431695c added a "use spnego" option
you need to set "use spnego = no" for w2k to be able to join a samba
domain. Otherwise the w2k box will assume we can do kerberos as a KDC
(This used to be commit b5cb57a367)
2001-12-07 01:01:10 +00:00
Herb Lewis
8d0eb004a0 OK I think this does what everyone wants with the .headers.stamp
it gets removed on a make clean
it gets created on a make headers (if it doesn't already exist)

This makes it so I only rebuild everthing once after a make clean and
also so nothing gets rebuilt after jfm does a make headers (proto)
(This used to be commit bc918bce10)
2001-12-07 00:37:31 +00:00
Andrew Tridgell
92dc801733 allow nsstest to test any nss module
(This used to be commit c531f4773e)
2001-12-06 22:42:27 +00:00
Herb Lewis
ff925a5afb add smbgroupedit
(This used to be commit ba2dd34407)
2001-12-06 19:04:01 +00:00
Jean-François Micouleau
e0066d2dd4 again an intrusive patch:
- removed the ugly as hell sam_logon_in_ssb variable, I changed a bit the
definition of standard_sub_basic() to cope with that.

- removed the smb.conf: 'domain admin group' and 'domain guest group'
parameters ! We're not playing anymore with the user's group RIDs !

- in get_domain_user_groups(), if the user's gid is a group, put it first
in the group RID list.

I just have to write an HOWTO now ;-)

        J.F.
(This used to be commit fef52c4b96)
2001-12-06 13:09:15 +00:00
Jean-François Micouleau
0069985ce3 remove .headers.stamp from the delheaders definition
It forced a complete build to occur each time the proto are rebuild !

	J.F.
(This used to be commit 9866c18193)
2001-12-06 12:57:50 +00:00
Andrew Tridgell
44384354d8 put the winbindd krb5 credentials cache in the lock directory
this prevents it clobbering the users cache
(This used to be commit 3de552f365)
2001-12-06 07:33:35 +00:00
Andrew Tridgell
94dd5cded7 allow a MAX_DEBUG_LEVEL setting in local.h (or the Makefile)
This allows embedded systems to compile out the higher debug
levels. It should gain speed as well as reducing the code
size. Setting it to 1 saves about 300k of code on my system.
(This used to be commit f34cac3b31)
2001-12-06 07:17:25 +00:00
Andrew Tridgell
d412f66cd8 added a propoer kerberos_kinit_password call
contribution from remus@snapserver.com

thanks!
(This used to be commit 3ace8f1fcc)
2001-12-06 05:41:53 +00:00
Tim Potter
839bcee0b4 Fixed typo in fix for typo in debug. (-:
(This used to be commit 7c64e5f148)
2001-12-06 04:23:06 +00:00
Herb Lewis
549e904d3f merge from 2.2
don't set WINBIND variables unless configure was run --with-winbind
(This used to be commit 83ec4c0f4d)
2001-12-05 21:08:17 +00:00
Herb Lewis
f3e6f2d953 dont add -I./popt to CFLAGS it really belongs in FLAGS1 with other include
paths. This make it hard to use a script that overrides CFLAGS options.
(This used to be commit 646b5ae752)
2001-12-05 19:45:30 +00:00
Jeremy Allison
7077558fb3 Added fetch_domain_sid. Not used in current code, but a nice example
of how to use this interface.
Jeremy.
(This used to be commit 2919851235)
2001-12-05 19:33:35 +00:00
Jean-François Micouleau
791788ea9d changed the DEBUG level of tdb_pack and tdb_unpack. Instead of 8, it's now
18.

when you're looking at a level 10, and it's all clutered with
tdb_pack/unpack, it's getting .... And anyway most of our code using
tdb_pack/unpack have DEBUG around the call if there is a problem.

	J.F.
(This used to be commit 7e20fad5ed)
2001-12-05 15:45:36 +00:00
Jean-François Micouleau
7b53a92f59 added samr_queryuseralias(). instead of returning BUILTIN_ALIAS_RID_USERS,
now return the alias correctly.

time to look at the netlogon case.

	J.F.
(This used to be commit 72ee179108)
2001-12-05 15:41:44 +00:00
Andrew Tridgell
95a21460b7 fixed a return value
(This used to be commit 56bdb152d8)
2001-12-05 11:32:25 +00:00
Andrew Bartlett
8ba00d147b OK. Smbpasswd -j is DEAD.
This moves the rest of the functionality into the 'net rpc join' code.

Futhermore, this moves that entire area over to the libsmb codebase, rather
than the crufty old rpc_client stuff.

I have also fixed up the smbpasswd -a -m bug in the process.

We also have a new 'net rpc changetrustpw' that can be called from a
cron-job to regularly change the trust account password, for sites
that run winbind but not smbd.

With a little more work, we can kill rpc_client from smbd entirly!
(It is mostly the domain auth stuff - which I can rework - and the
spoolss stuff that sombody else will need to look over).

Andrew Bartlett
(This used to be commit 575897e879)
2001-12-05 11:00:26 +00:00
Andrew Bartlett
0d09562eed Add a couple of extra debugs for the secrets.tdb stuff
(This used to be commit c76c1f6904)
2001-12-05 10:52:13 +00:00
Andrew Bartlett
3f387d1971 Ensure we fill in the %U for NTLMSSP connections
(This used to be commit d15ea4fa8e)
2001-12-05 10:50:26 +00:00
Andrew Tridgell
410dfc917f fixed a minor password memory leak
(This used to be commit 5985d7e6ee)
2001-12-05 10:44:30 +00:00
Andrew Tridgell
a87b9bf561 fixed a memory leak
(This used to be commit 45c328800e)
2001-12-05 10:43:43 +00:00
Andrew Tridgell
6194d6a541 fix link error
(This used to be commit 58e93a8b7d)
2001-12-05 10:35:25 +00:00
Andrew Tridgell
8aa0a817c1 handle ldap server down better
(This used to be commit 0d85815c99)
2001-12-05 10:14:22 +00:00
Andrew Tridgell
9421ad4a7a added a REALLY gross hack into kerberos_kinit_password so that
winbindd can do a kinit
this will be removed once we have code that gets a tgt
and puts it in a place where cyrus-sasl can see it
(This used to be commit 7d94f1b736)
2001-12-05 09:46:53 +00:00
Andrew Tridgell
cc3aff7436 auto-init secrets.tdb
(This used to be commit aff916e543)
2001-12-05 09:45:00 +00:00
Andrew Tridgell
5d41807f4d added timeouts and retries to ldap operations
(This used to be commit 4f004eb54d)
2001-12-05 09:19:25 +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 9a084f0bb9)
2001-12-05 07:52:44 +00:00
Andrew Tridgell
5329af6e11 don't double free ldap message lists
(This used to be commit f64612b89b)
2001-12-05 07:36:35 +00:00
Andrew Tridgell
0799c44680 paranoia fixes in based ldap routines for potential memory leaks
(This used to be commit 13b933104e)
2001-12-05 07:35:57 +00:00
Andrew Tridgell
cb01c8e192 fixed another leak - memory usage now seems to be quite small
(This used to be commit a45e396859)
2001-12-05 07:11:26 +00:00
Andrew Tridgell
a313351e94 added very basic ads connection cacheing
(This used to be commit 7de670cd15)
2001-12-05 07:05:53 +00:00
Andrew Tridgell
5f76385e70 more memory leak fixes
(This used to be commit eb6f0e91dd)
2001-12-05 06:26:56 +00:00
Andrew Tridgell
faa0f63774 plugged most of the memory leaks
(This used to be commit 60b5d4432a)
2001-12-05 06:16:33 +00:00
Andrew Tridgell
ca61334c76 added the last winbindd/ads backend function
winbindd is now fully functional with a native mode w2k server

now for the memory leaks and speed ...
(This used to be commit fad564c177)
2001-12-05 05:35:45 +00:00
Andrew Tridgell
3278f563b9 finally worked out how to do ldap lookups by binary blobs, so I can
now do searches on SID. This allows me to do a true ldap sid_to_name()
function

one one function to go!
(This used to be commit 7d44aa3915)
2001-12-05 04:48:51 +00:00
Andrew Tridgell
19c0459153 added functions that convert a ads binary blob to a string (for
searching on SID)
(This used to be commit 31d6d049b3)
2001-12-05 04:44:34 +00:00
Andrew Tridgell
24449a9b0b fixed an off by 1 bug in talloc_asprintf()
(This used to be commit 2b2155beae)
2001-12-05 04:43:53 +00:00
Jeremy Allison
f8abe6eba4 Fixed parse_domain_user to be bool.
Jeremy.
(This used to be commit 9563de2ef8)
2001-12-05 04:17:39 +00:00
Andrew Bartlett
cf90455854 Add a new flag for anonymous connections
(This used to be commit 5a96391c75)
2001-12-05 03:14:35 +00:00
Andrew Bartlett
f98d753b2f Make it easier to construct anonymous connections with a new flag and helper
function.
(This used to be commit 61b0f5f4f9)
2001-12-05 03:14:21 +00:00
Andrew Bartlett
2f87684a1e Split out the name resolution code into a seperate function
(This used to be commit b2443f6fca)
2001-12-05 02:58:40 +00:00
Jeremy Allison
105f8a1a0f Use print_queue_length() by preference if we don't need a queue
as it doesn't do a traversal.
Jeremy.
(This used to be commit 4bf4ee3f14)
2001-12-05 02:11:03 +00:00
Andrew Bartlett
241a32b436 Follow herb's suggestion and don't strdup a string to itself
(This used to be commit d00f461f43)
2001-12-05 01:59:32 +00:00
Andrew Bartlett
f018400b69 Follow herb's suggestion and don't strdup a string to itself.
(This used to be commit ea76a687fc)
2001-12-05 01:58:33 +00:00
Jeremy Allison
5472638730 Improved efficiency of enumerating print queue's under a particular
extreme condition...
Jeremy.
(This used to be commit 425bb0f405)
2001-12-05 00:54:33 +00:00
Andrew Bartlett
38d10d2ac1 Add a mechinism to allow for sane porting of rpcclient components into the new
'net' command.

This also gets us 'net rpc user add'.

Andrew Bartlett
(This used to be commit 1197689bc5)
2001-12-05 00:26:36 +00:00
Andrew Bartlett
8818847c85 Ditto on the const religion.
(This used to be commit e1b940c91b)
2001-12-05 00:24:57 +00:00
Andrew Bartlett
d67041a532 Const religion for some of the RPC code.
(This used to be commit 64bf8f81c4)
2001-12-05 00:22:24 +00:00
Herb Lewis
61fc7b98a7 Merge from 2.2
If you do not have one more expect than issue when talking to the passwd
program you will not send the last issue.
(This used to be commit 8aafec95cb)
2001-12-04 22:24:17 +00:00
Jean-François Micouleau
e9894404ba move proto.h and build_env.h from $(srcdir)/include to $(builddir)/include
tridge, martin, if you think it's wrong , you can revert it.

	J.F.
(This used to be commit f057d62aae)
2001-12-04 21:58:37 +00:00
Jean-François Micouleau
922eb763d7 added a boolean to the group mapping functions to specify if we need or
not the privileges. Usually we don't need them, so the memory is free
early.

lib/util_sid.c: added some helper functions to check an SID.

passdb/passdb.c: renamed local_lookup_rid() to local_lookup_sid() and pass
an RID all the way. If the group doesn't exist on the domain SID,
don't return a faked one as it can collide with a builtin one. Some rpc
structures have been badly designed, they return only rids and force the
client to do subsequent lsa_lookup_sid() on the domain sid and the builtin
sid !

rpc_server/srv_util.c: wrote a new version of get_domain_user_groups().
Only the samr code uses it atm. It uses the group mapping code instead of
a bloody hard coded crap. The netlogon code will use it too, but I have to
do some test first.

	J.F.
(This used to be commit 6c87e96149)
2001-12-04 21:53:47 +00:00
Jeremy Allison
4d3ec230b4 Correct message on wbinfo fail to open config file.
Jeremy.
(This used to be commit 9b7182a9da)
2001-12-04 21:30:52 +00:00
Jeremy Allison
20fdf28178 Tidup.
Jeremy.
(This used to be commit 837f2b961b)
2001-12-04 18:37:14 +00:00
Martin Pool
84c19504d0 Put back changes to set errno, which seem to do no harm.
(This used to be commit 3dbb5dfcfb)
2001-12-04 13:21:15 +00:00
Martin Pool
65e1d4a7a5 Fix headers. This I know is correct.
(This used to be commit 58cfea3c2a)
2001-12-04 13:17:22 +00:00
Martin Pool
858f1865df Fix headers. This I know is correct.
(This used to be commit 0c22a10d73)
2001-12-04 12:44:10 +00:00
Andrew Tridgell
7b64e61e68 added lookup_groups() to the ads backend
winbindd/ADS can now do initgroups()
(This used to be commit 43edeaca9f)
2001-12-04 12:10:05 +00:00
Andrew Tridgell
3ec4a4def3 added ads_search_dn() and ads_pull_sids()
(This used to be commit bc83d55f44)
2001-12-04 12:08:16 +00:00
Martin Pool
84503c81f0 undo
(This used to be commit fc176f15f2)
2001-12-04 11:41:12 +00:00
Martin Pool
28e676d9c3 Implement suggestion from tridge to leave the old tdb_open interface
as it was, and add tdb_open_ex() which takes a log callback.  I guess
this makes more sense since it's a public interface.
(This used to be commit 391a65395e)
2001-12-04 11:25:44 +00:00
Martin Pool
7d9e09f527 Better error handling:
- tdb_open api changed so that you now pass an error handling
   callback when opening the file, so that errors detected during
   opening have somewhere to go.  (All calls from the body of Samba to
   this function go through a wrapper in tdbutil, which has been
   updated.)

 - Clean up logic for deciding how to open tdb.  Emit log messages if
   something goes wrong (e.g. bad magic.)

 - tdbtool now logs errors to stderr.
(This used to be commit 0aa800618e)
2001-12-04 07:40:25 +00:00
Andrew Tridgell
c75ef67f97 allow for passwords other than "samba2"
:)
(This used to be commit cee58f1097)
2001-12-04 06:56:58 +00:00
Andrew Tridgell
1d66a6beba moved lookup_usergroups() into the backend structure
(This used to be commit 689f45d207)
2001-12-04 06:46:53 +00:00
Andrew Tridgell
1838d83e24 moved init_account_policy() to the right place
(This used to be commit e908f304a2)
2001-12-04 06:20:39 +00:00
Andrew Tridgell
8e8ce079b8 added a query_user backend
fixed a winbindd crash when the group membership can't be looked up
(This used to be commit 088f4cc5be)
2001-12-04 06:17:39 +00:00
Andrew Tridgell
de98a82052 typo fix
(This used to be commit 660238adca)
2001-12-04 06:16:02 +00:00
Andrew Tridgell
aa1e690ba5 const religion in talloc calls
(This used to be commit ea5d285721)
2001-12-04 06:14:42 +00:00
Andrew Bartlett
a2fbc74f74 smbpasswd is *ugly*!
However this looks like the best spot to init the account policy db...

(fix segfaults on all local smbpasswd ops)

Andrew Bartlett
(This used to be commit 3f3bb62ba6)
2001-12-04 05:16:54 +00:00
Jeremy Allison
6f0e7b69b7 winbindd friendly user_in_list code. Tested on a 65k user domain.
Jeremy.
(This used to be commit 5215bcca15)
2001-12-04 05:13:04 +00:00
Andrew Bartlett
3bc87626ae Add 'net rpc join' to match the ADS equiv.
This kills off the offending code in smbpasswd -j -Uab%c

In the process we have changed from unsing compelatly random passwords
to random, 15 char ascii strings.  While this does produce a decrese in
entropy, it is still vastly greater than we need, considering the application.

In the meantime this allows us to actually *type* the machine account
password duruign debugging.

This code also adds a 'check' step to the join, confirming that the
stored password does indeed do somthing of value :-)

Andrew Bartlett
(This used to be commit c0b7ee6ee5)
2001-12-04 05:03:03 +00:00
Andrew Bartlett
275a9f4ef7 Some changes to the name resolution code in 'net' to allow us to find a
PDC, as well as changes for correctness as per tridge.

Andrew Bartlett
(This used to be commit 16d302c5cc)
2001-12-04 04:48:01 +00:00
Andrew Bartlett
7b0b556804 Fix up funtion name, as this finds local, not domain master browsers.
(as per tridge's instructions)
(This used to be commit 0692d792f2)
2001-12-04 04:45:17 +00:00
Andrew Bartlett
85450cb1c9 This comment no longer applies.
(This used to be commit 153c4a56b0)
2001-12-04 04:33:22 +00:00
Martin Pool
8164fa34d9 Magic file for TDB databases.
(This used to be commit e9085129dd)
2001-12-04 04:03:29 +00:00
Jeremy Allison
3667377851 Stop using getgrgid() - a very expensive call with winbindd, to look up
a group name.
Jeremy.
(This used to be commit b926660e73)
2001-12-04 03:59:18 +00:00
Jeremy Allison
8e99888e7b Moved name_is_local to the correct place. Ooops.
Jeremy.
(This used to be commit 708c0a8d16)
2001-12-04 03:47:44 +00:00
Martin Pool
6c3163cc97 Set errno in tdb_open in cases where we detect an error in opening the
database, but no underlying system call sets errno.

The particular case I had was a mangled .tdb, but there are others.
For this one, set EIO.  It's a shame Unix messages aren't more
detailed -- "bad data format" would be better.
(This used to be commit 5630a988be)
2001-12-04 02:58:42 +00:00
Jeremy Allison
c2e3d8ba01 Tidyup of lib/username. Add name_is_local fn to determine if name is
winbindd. Getting ready for efficiency fix in group lookups.
Jeremy.
(This used to be commit 8d41dfd149)
2001-12-04 02:58:22 +00:00
Tim Potter
bca2bcd87e Added error message for ERRdiskfull.
(This used to be commit 9f5d7e8a04)
2001-12-04 00:46:12 +00:00
Andrew Tridgell
0dc386855f when using non-encrypted password ignore the ntpass variable to
session setup
(This used to be commit c7665706cd)
2001-12-04 00:07:08 +00:00
Jeremy Allison
15dba42364 Added prototypes for new fns. Thanks Elrond.
Jeremy.
(This used to be commit 2a7bd621b4)
2001-12-03 20:39:15 +00:00
Jean-François Micouleau
cdf9b42754 added a tdb to store the account policy informations.
You can change them with either usermanager->policies->account
or from a command prompt on NT/W2K: net accounts /domain

we can add a rpc accounts to the net command. As the net_rpc.c is still
empty, I did not start. How should I add command to it ? Should I take the
rpcclient/cmd_xxx functions and call them from there ?

alse changed the SAM_UNK_INFO_3 parser, it's an NTTIME. This one is more
for jeremy ;-)

        J.F.
(This used to be commit bc28a8eebd)
2001-12-03 17:14:23 +00:00
Andrew Tridgell
fc85a60962 changed query_dispinfo to query_user_list
(This used to be commit 80010d80f9)
2001-12-03 11:32:55 +00:00
Andrew Tridgell
6f907af4e7 put sid_to_name behind the winbindd backend interface
I spent quite a while trying to work out how to make this call
via ldap and failed. I then found that MS servers seem use rpc
for sid_to_name, and it works even when in native mode, I ended
up just implementing it via rpc
(This used to be commit 789833b44e)
2001-12-03 11:11:14 +00:00
Andrew Tridgell
c868fe502b added name_to_sid to the backend
(This used to be commit 816e40a51a)
2001-12-03 08:17:46 +00:00
Andrew Tridgell
b6b84cf709 const religion
(This used to be commit 359ca8f246)
2001-12-03 08:16:51 +00:00
Andrew Tridgell
4405a1cc4f added another ATYPE_
(This used to be commit 514bc61daa)
2001-12-03 08:16:01 +00:00
Andrew Tridgell
92f47c03e0 make proto should build winbindd_proto.h as well
(This used to be commit c8339ce5c8)
2001-12-03 08:15:18 +00:00
Andrew Bartlett
3ea7519b06 This change reworkes the connection code for both rpcclient and net new
'net' untility.

This should make it easier to port rpcclient code across to net.

It also allows SPNEGO (the NTLMSSP subsystem in particular) to work, becouse
it kills off the early destruction of the clear-text password.

Andrew Bartlett
(This used to be commit eee925861a)
2001-12-03 07:42:18 +00:00
Andrew Bartlett
8e16021383 Forgot this one with the last commit...
Andrew Bartlett
(This used to be commit 8dbd9702d8)
2001-12-03 06:49:47 +00:00
Andrew Tridgell
2285b99cb1 added a basic ADS backend to winbind. More work needed, but at
least basic operations work
(This used to be commit 88241cab98)
2001-12-03 06:04:18 +00:00
Andrew Bartlett
feb4f52f13 This is another major rework of the 'net' command.
This time, all the existing functionality has been moved into
'net rap', ready for new commands in the 'net ads' and 'net rpc' categories.

In particular, we hope to have the abilty to autoselect the appropriate
backend to use based on smb.conf or other paramaters.

This will allow 'net user' to work no matter what the remote server.

The new 'net rpc' command will soon gain a 'net rpc join' and a
'net rpc user' based on the existing samba code.

Also in this commit, the connection establishment code has been almost entirly
reworked, and now has some minor sense of sainity to it.
In particular, we can now connect to hosts *other* than localhost!

We also have the ability to state on a per-command basis whether the 'localhost'
is a sane default value.  (A net join, for example, would not be sane against
localhost).

Unfortunetly we have had to make the basic paramaters global variables, but
the 'cli' is not opened and closed on a per-command basis.

Andrew Bartlett
(This used to be commit 8739d426ca)
2001-12-03 04:39:23 +00:00
Tim Potter
25ea74978f Don't display any data if tdb_fetch() failed in the tdbtool "fetch"
command.
(This used to be commit a1cf70ab65)
2001-12-03 04:15:26 +00:00
Andrew Tridgell
7f9fe00d35 added nsstest target
fixed winbindd_rpc.o typo
(This used to be commit 2ce7f38fe9)
2001-12-03 04:09:43 +00:00
Andrew Tridgell
fc85c8a3eb fixed default location of libnss_winbind.so
(This used to be commit adc9268216)
2001-12-03 03:57:34 +00:00
Andrew Tridgell
37749cbb04 fixed the nsswitch initgroups code
added a nsstest test program that directly tests all the nss
interfaces using dlopen()
(This used to be commit aee19090d3)
2001-12-03 03:53:57 +00:00
Martin Pool
e0adf6e27e Writing decimal constants as "02" has been shown to cause cancer in
rats.
(This used to be commit 142d3dad0a)
2001-12-03 02:30:27 +00:00
Andrew Tridgell
78169af90a split winbindd_enum_dom_groups into the new backend structure
also created winbindd_rpc.c which contains the functions that
have been converted to the new structure. There will soon be
a winbindd_ads.c for the ldap backend
(This used to be commit e4ccc602ba)
2001-12-03 01:23:42 +00:00
Tim Potter
3171064521 Updated definition of fstring.
print_asc(): Don't try to print a trailing NULL character
print_key(), print_rec(): Display key in ASCII
(This used to be commit 303b3a3595)
2001-12-03 00:23:14 +00:00
Andrew Tridgell
61f68bde82 re-enabled insure backtrace, calling /usr/bin/backtrace
(This used to be commit 21a366afbe)
2001-12-03 00:21:51 +00:00
Andrew Tridgell
e101224d83 init group db before use
this fixes the smbpasswd segvs
(This used to be commit d2bcdfd995)
2001-12-03 00:00:43 +00:00
Jean-François Micouleau
633ee99afa added queryuseraliases to rpcclient
and some comments to the samr server code, to explain what we should
return here.

	J.F.
(This used to be commit 06cb20a46d)
2001-12-02 01:45:50 +00:00
Jean-François Micouleau
043dfe985c there was a bug in samr_lookup_names (my fault)
and added comments and some debugs.

	J.F.
(This used to be commit 114eba496f)
2001-12-02 00:06:10 +00:00
Jean-François Micouleau
83304678a0 added mapping of primary gid to rid thru the group mapping code.
and cleanup and comments in passdb/passdb.c


	J.F.
(This used to be commit 6533339887)
2001-12-02 00:03:35 +00:00
Jean-François Micouleau
d383b618b4 added samr_query_sec_obj. and put back some code to display a security
descriptor.

added to samr_lookup_name the choice to select the either the builtin
(s-1-5-32) domain or our current domain (s-1-5-21-x-y-z)

	J.F.
(This used to be commit d9d1486165)
2001-12-02 00:00:21 +00:00
Jean-François Micouleau
d78f6366e8 added samr_query_sec_obj for rpcclient
J.F.
(This used to be commit d8809c5861)
2001-12-01 23:57:11 +00:00
Jean-François Micouleau
92a2d1d463 groups in the Builtin domain S-5-32 are alias and not well-known groups
J.F.
(This used to be commit 192978e3fc)
2001-12-01 23:56:05 +00:00
Jean-François Micouleau
f3bffe143c removed the #ifdef USING_GROUPNAME_MAP/#endif blocks
that GROUPNAME_MAP has never been used.

I'll delete the smbd/groupname.c file too

	J.F.
(This used to be commit 2285e98f20)
2001-12-01 23:53:32 +00:00
Jean-François Micouleau
df5dd906a7 added smbgroupedit to compile by default
J.F.
(This used to be commit 540a6122dc)
2001-12-01 23:51:21 +00:00
Andrew Tridgell
de744cb970 The beginnings of alternative backends for winbindd
This just splits off the dispinfo call behind a methods structure.
I'll split off a few more functions soon, then we will be ready for
LDAP replacement methods
(This used to be commit 0216b0fca1)
2001-12-01 12:31:43 +00:00
Motonobu Takahashi
c5f4a4b9ad added $(LDFLAGS) to link smbmount/smbmnt/smbumount to make Red Hat Linux
happy
(This used to be commit 7dfde592aa)
2001-12-01 05:28:14 +00:00
Andrew Tridgell
e573bfa386 not used any more
(This used to be commit 97627e424a)
2001-12-01 03:26:57 +00:00
Andrew Tridgell
3756055ea1 we need to look for liblber before libldap
(This used to be commit 93a652b705)
2001-11-30 22:45:52 +00:00
Jeremy Allison
a9750b2006 XFS quota patch for Linux.
Jeremy.
(This used to be commit ce099faf6c)
2001-11-30 21:50:02 +00:00
Gerald Carter
9cc8cb5134 merge from APPLIANCE_HEAD
(This used to be commit f8b18b2594)
2001-11-30 20:33:35 +00:00
Jeremy Allison
605248abd9 Check error returns.
Jeremy.
(This used to be commit fc8638e89e)
2001-11-30 03:45:21 +00:00
Jeremy Allison
445ab75ec3 Gerald's fix.
Jeremy
(This used to be commit b0c1fcfc8b)
2001-11-30 03:38:59 +00:00
Jeremy Allison
9e88a7ebe9 After conversations with Andrew, improved the robustness of the
sharemode db in the following way.

Originally, on startup and shutdown, smbd would scan the share mode
db to ensure it was correct. This lead to scalability issues as
scans lock the db for quite a long time. Andrew had the brainstorm
that we only care about the record we're about to read.

This new code (small change really, but quite significant) causes
get_share_modes() to do a process_exists() call against each pid
in each record, and to delete any that don't and re-write the
entry if any dead records were detected.

This allowed me to remove the startup/shutdown scans of the
db (they can be added into smbstatus if anyone really cares to
have them back). This will please the vfs author who was worried
about the time taken on open() calls, and will lead to much
greater robustness and scalability in the share mode db.

We need much testing of this, and also netbench tests to
ensure the extra process_exists() calls don't hurt performance
(they shouldn't it's a very simple system call).

Jeremy.
(This used to be commit 4098d44203)
2001-11-30 01:59:03 +00:00
Tim Potter
6d9adfe73c Renamed sid field in SEC_ACE to trustee to be more in line with MS's
definitions.
(This used to be commit 9712d3f15a)
2001-11-30 01:04:15 +00:00
Tim Potter
0d5f30fe5f Missing return in free_privilege()
(This used to be commit b35d90cd89)
2001-11-30 00:46:40 +00:00
Jeremy Allison
ed7feb560b Ensured the %G substitution exactly matches what the man page states.
Jeremy.
(This used to be commit 518084a70d)
2001-11-30 00:28:39 +00:00
Tim Potter
faac64b33f Comment deconfusification.
(This used to be commit b5fac3a56d)
2001-11-30 00:24:43 +00:00
Jean-François Micouleau
fac01bda8b Changed again how the privilege list is handled in the group mapping code.
This time it's a PRIVILEGE_SET struct instead of a simple uint32 array. It
makes much more sense. Also added a uint32 systemaccount to the GROUP_MAP
struct as some privilege showing in USRMGR.EXE are not real privs but a
bitmask flag. I guess it's an heritage from NT 3.0 ! I could setup an NT
3.1 box to verify, but I'm too lazy (yes I still have my CDs).

Added 3 more LSA calls: SetSystemAccount, AddPrivileges and
RemovePrivileges, we can manage all this privilege from UserManager.

Time to change the NT_USER_TOKEN struct and add checks in all the rpc
functions. Fun, fun, fun.

        J.F.
(This used to be commit 3f0a9ef2b8)
2001-11-29 16:05:05 +00:00
Andrew Tridgell
3a921f37b7 ads->realm must not be NULL
perhaps we should just fail ads_init() in this case?
(This used to be commit 2a4ce3de6a)
2001-11-29 08:22:45 +00:00
Andrew Tridgell
090acb27c3 define LDAP_PORT when not available
(This used to be commit 5a5f140f84)
2001-11-29 06:38:54 +00:00
Andrew Tridgell
7879a1a811 fixed typo
(This used to be commit 624cb28271)
2001-11-29 06:26:05 +00:00
Andrew Bartlett
210711c6a0 Fix up the ./configure tests for kerberos. This ensures a more consistant
behaviour no matter if kerberos was found automatically, found in the
/usr/kerberos path or was specified.
(This used to be commit 4e212f728c)
2001-11-29 06:23:43 +00:00
Andrew Bartlett
fe64484824 Make better use of the ads_init() function to get the kerberos relam etc.
This allows us to use automagically obtained values in future, and the value
from krb5.conf now.

Also fix mem leaks etc.

Andrew Bartlett
(This used to be commit 8f9ce71781)
2001-11-29 06:21:56 +00:00
Tim Potter
ff27a326f1 I think the lookup_pdc_name() should be called lookup_dc_name() and the
name_status_find() call here should look up a #1c name instead of #1d.
This fixes some bugs currently with BDC authentication in winbindd and in
smbd as you can't query the #1d name with the ip address of a BDC.

Who is Uncle Tom Cobbley anyway?
(This used to be commit 4215048f7b)
2001-11-29 05:50:32 +00:00
Andrew Tridgell
5bfc7214af fixed toupper_w() and friends on big-endian
this fixes the core dumps on sparc
(This used to be commit e6004062a5)
2001-11-29 05:20:23 +00:00
Andrew Tridgell
fbcf770865 2nd attempt at fixing lame char tables on big endian machines
(This used to be commit 80841f5763)
2001-11-29 05:03:15 +00:00
Andrew Tridgell
8bd89c72a3 fixed lame char tables on big endian machines
(This used to be commit 568425709d)
2001-11-29 04:58:29 +00:00
Andrew Tridgell
f6b962fba3 fixed some krb5 ifdefs
(This used to be commit 23ef22f117)
2001-11-28 23:54:07 +00:00
Gerald Carter
bd8e916cb5 merge from APPLIANCE_HEAD
(This used to be commit c60aa6c06f)
2001-11-28 21:51:11 +00:00
Jeremy Allison
7d2d605f0d space -> tab.
Jeremy.
(This used to be commit c7dd0364f2)
2001-11-28 19:51:25 +00:00
Herb Lewis
3a193f1597 add .po32 files to ignore list
(This used to be commit 5f625f2877)
2001-11-28 19:49:43 +00:00
Jeremy Allison
59a8827f5d Spelling pedents strike again :-).
Jeremy.
(This used to be commit 0187d4ba16)
2001-11-28 18:10:13 +00:00
Andrew Bartlett
299edaa854 Allow kerberos to work on RedHat and other non /usr systems again
the configure test uses the CPPFLAGS when checking that krb5.h exists
(This used to be commit 1e4fc749ad)
2001-11-28 06:52:33 +00:00
Andrew Tridgell
b1ade34705 fixed a core dump in server level security
(This used to be commit e790bb21d3)
2001-11-28 05:49:36 +00:00
Jeremy Allison
a17867af97 Ensure the CAN_WRITE is checked and prevents O_CREAT and O_TRUNC from
being set. Also prevent an open on a file on a readonly share from
setting delete on close.
Jeremy.
(This used to be commit 1f3dcd99bd)
2001-11-28 05:03:37 +00:00
Jeremy Allison
1a50b36d97 Re-added "Share modes" meaning don't allow deny mode conflict. Due to
user demand (don't talk to me about removing parameters.... :-).
Jeremy.
(This used to be commit b69127391b)
2001-11-28 04:47:46 +00:00
Andrew Tridgell
241b1b9aa6 turn off the insure xterm hack for now
(This used to be commit 8698f7ef3e)
2001-11-28 04:44:23 +00:00
Tim Potter
d0ea72d0b7 Added a 'keys' command to tdbtool which prints out all keys in the tdb.
(This used to be commit 1d2305c233)
2001-11-28 03:58:33 +00:00
Andrew Tridgell
eec9e8a052 fix a bunch of places where we can double-free a cli structure
(This used to be commit e2ba2383c9)
2001-11-28 03:56:30 +00:00
Jeremy Allison
a6b73b9767 Cross merge to make 2.2 and HEAD closer.
Jeremy.
(This used to be commit 39f076b56c)
2001-11-28 02:42:55 +00:00
Jean-François Micouleau
e158c4123d added samr_set_domain_info and samr_unknown_2E.
We now get the full account policy window in usermanager, and the
framework to store all those values. I plan to add a TDB file to store
them.

oh, and found that the last value in a sam_unknown_info_12_inf struct is
an uint16 and not a uint32.

andrewb: you hardcoded the MAX_PASSWORD_AGE to 21 days. We can now turn it
to a value setable in usermanager.

        J.F.
(This used to be commit 99471d2569)
2001-11-28 00:06:00 +00:00
Tim Potter
7ca15c1485 Some reformatting.
M-x tabify
(This used to be commit 6446d2acd5)
2001-11-27 23:48:44 +00:00
Andrew Tridgell
5e25ba6fec always send an OID list until we handle raw (unwrapped) NTLMSSP
packets in session setup
(This used to be commit 3b3f8a9350)
2001-11-27 23:41:14 +00:00