1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

7720 Commits

Author SHA1 Message Date
Jeremy Allison
e400bfce39 Report write fail in smb_dump.
Jeremy.
(This used to be commit 832b9e7838afc0a48932dd0622c7e2f7b7e44a8f)
2002-01-19 21:29:20 +00:00
Jeremy Allison
95501cf1ba Fix to close winbindd_idmap on exit. Pointed out by Alexander Bokovoy.
Jeremy.
(This used to be commit 1bd96b3094b530c3426b22b6f891c7fc055e7033)
2002-01-19 20:21:29 +00:00
Simo Sorce
7019bfe546 fixes (asprintf) from 2.2
(This used to be commit 6b123adda901ff05b0271eeda060297448f64eec)
2002-01-19 17:29:32 +00:00
Andrew Bartlett
72544acc0d Fix up runlist botchup.
(This used to be commit af37a86917c969118a46cff7574487dbe1c75a2f)
2002-01-19 00:38:34 +00:00
Andrew Bartlett
1188ffe214 Update the build farm's test runlist and make it a bit easier to read.
(This used to be commit 12dcb55a3a89ce4b7daa5d41c41ebaf9e15b3de0)
2002-01-18 23:52:43 +00:00
Andrew Bartlett
aea134de2c Don't do tridge's crazy 'am I a trusted domain' lookup for guests.
Andrew Bartlett
(This used to be commit 9bfe54a3d484919fe830f9c6ae01f67663974af2)
2002-01-18 08:12:10 +00:00
Jeremy Allison
efdb29d0e0 Ensure (C) message is output on startup.
Jeremy.
(This used to be commit 7d05175494227bf30d098e04ec91c4f0a7b7184c)
2002-01-18 03:26:53 +00:00
Jeremy Allison
a0b86d4cd2 If 127.0.0.1 matches both allow & deny then allow. Patch from Steve Langasek vorlon@netexpress.net
Jeremy.
(This used to be commit 478696e924a5e562965eb21841198c96500027c4)
2002-01-18 03:08:40 +00:00
Andrew Bartlett
1fb9ccc4e2 This is the 'winbind default domain' patch from Alexander Bokovoy
<a.bokovoy@sam-solutions.net>.

The idea is the domain\username is rather harsh for unix systems - people don't
expect to have to FTP, SSH and (in particular) e-mail with a username like
that.

This 'corrects' that - but is not without its own problems.

As you can see from the changes to files like username.c and wb_client.c (smbd's
winbind client code) a lot of assumptions are made in a lot of places about
lp_winbind_seperator determining a users's status as a domain or local user.

The main change I will shortly be making is to investigate and kill off
winbind_initgroups() - as far as I know it was a workaround for an old bug in
winbind itself (and a bug in RH 5.2) and should no longer be relevent.

I am also going to move to using the 'winbind uid' and 'winbind gid' paramaters
to determine a user/groups's 'local' status, rather than the presence of the
seperator.

As such, this functionality is recommended for servers providing unix services,
but is currently less than optimal for windows clients.

(TODO: remove all references to lp_winbind_seperator() and
lp_winbind_use_default_domain() from smbd)

Andrew Bartlett
(This used to be commit 07a21fcd2311d2d9b430b99303e3532a8c1159e4)
2002-01-18 02:37:55 +00:00
Jeremy Allison
9d05373a76 Tidyup & code refactoring from Martin.Sheppard@csiro.au.
Jeremy.
(This used to be commit 85da18e46e607aa593b7c55f2c7eddd1c3769673)
2002-01-18 02:30:37 +00:00
Jeremy Allison
3a851587f8 Ensure we log tdb open fails. Patch from Alexander Bokovoy <a.bokovoy@sam-solutions.net>
Jeremy.
(This used to be commit eb99e7f29c2d6041054331425cb245da86bedaa4)
2002-01-18 02:15:04 +00:00
Jeremy Allison
2a3673994d Added prs_mem_clear(). Clear memory on buffer reallocation. That way
we're not returning what the client gave us.
Jeremy.
(This used to be commit 9a969069f132019cdd8a11be2b00356a3f09b64d)
2002-01-18 00:36:16 +00:00
Jeremy Allison
37834a48e8 Always clear malloced memory for parse structs.
Jeremy.
(This used to be commit 6deb4caca5b45f87be84032fe0588db8d73b901a)
2002-01-18 00:19:45 +00:00
Andrew Bartlett
c311d24ce3 A nice *big* change to the fundemental way we do things.
Samba (ab)uses the returns from getpwnam() a lot - in particular it keeps
them around for a long time - often past the next call...

This adds a getpwnam_alloc and a getpwuid_alloc to the collection.

These function as expected, returning a malloced structure that can be
free()ed with passwd_free(&passwd).

This patch also cuts down on the number of calls to getpwnam - mostly by
taking advantage of the fact that the passdb interface is already
case-insensiteve.

With this patch most of the recursive cases have been removed (that I know
of) and the problems are reduced further by not using the sys_ interface
in the new code.  This means that pointers to the cache won't be affected.
(This is a tempoary HACK, I intend to kill the password cache entirly).

The only change I'm a little worried about is the change to
rpc_server/srv_samr_nt.c for private groups.  In this case we are getting
groups from the new group mapping DB.  Do we still need to check for private
groups?  I've toned down the check to a case sensitve match with the new code,
but we might be able to kill it entirly.

I've also added a make_modifyable_passwd() function, that copies a passwd
struct into the form that the old sys_getpw* code provided.  As far as I can
tell this is only actually used in the pass_check.c crazies, where I moved
the final 'special case' for shadow passwords (out of _Get_Pwnam()).

The matching case for getpwent() is dealt with already, in lib/util_getent.c

Also included in here is a small change to register the [homes] share at vuid
creation rather than just in one varient of the session setup.  (This picks
up the SPNEGO cases).  The home directory is now stored on the vuid, and I
am hoping this might provide a saner way to do %H substitions.

TODO:  Kill off remaining Get_Pwnam_Modify calls (they are not needed), change
the remaining sys_getpwnam() callers to use getpwnam_alloc() and move
Get_Pwnam to return an allocated struct.

Andrew Bartlett
(This used to be commit 1d86c7f94230bc53daebd4d2cd829da6292e05da)
2002-01-17 08:45:58 +00:00
Andrew Bartlett
350161d44b Move the bang (!) command back to the bottom of the list, allowing smbclient
to function again.

Add comment to warn anybody that wants to 'Alphabetize' the list to read crh's
existing comment on the issue.

Andrew Bartlett
(This used to be commit d123d79060caf3ad084e733dac02aa2f67bda35f)
2002-01-17 07:14:21 +00:00
Tim Potter
21a6c34485 Made a debug look nicer.
(This used to be commit aca0edc819e892944c65b3feb60250994a79e88a)
2002-01-17 05:07:36 +00:00
Tim Potter
269d24f716 Added some guards.
(This used to be commit 967c68858001cd620d2524d56180497c4b479c6b)
2002-01-17 03:03:58 +00:00
Tim Potter
6c705b69db Fixed typo.
(This used to be commit e675d34dbfe1435150faf5af4bb97f01d311f5b0)
2002-01-17 02:54:23 +00:00
Herb Lewis
80653ebbbf new config files for winbindd startup
(This used to be commit 4ab2a775438f4266d270c626a9ad547c97c4eb62)
2002-01-17 01:18:13 +00:00
Andrew Tridgell
ab3cae9768 fixed a typo in the error map for WRONG_PASSWORD
(This used to be commit fb300e411bb385dcba2c3ca166598a71ed693b35)
2002-01-17 01:05:34 +00:00
Andrew Tridgell
630e0ae8ef don't use O_NONBLOCK in open(). This was added erroneously for kernel
oplocks and really shouldn't be used
(This used to be commit c3a83002cfc2e0b5158cae1898eda8bafcb41e48)
2002-01-17 00:25:13 +00:00
Jeremy Allison
08019e8a33 Separate out get_user_home_dir() from get_user_home_service_dir().
Jeremy.
(This used to be commit c1b97226db63daf64359e79083a4754e7c7f8054)
2002-01-16 23:53:10 +00:00
Jeremy Allison
5cf6457bcc Merged in %S fixes and XX_NOT_CHANGED fixes from 2.2.
Jeremy.
(This used to be commit 0fcca6c627a5c9c2219ec9714df5e0bc1a44cc29)
2002-01-16 23:32:10 +00:00
Jeremy Allison
04ec469c72 Fixup error mapping so we have only one table containing errno -> dos error -> NT STATUS
maps. Fixes problem with disk full returning incorrect error.
Jeremy.
(This used to be commit 16fcbf3c1ccf1d704765653f68395dd596c0d841)
2002-01-16 21:27:57 +00:00
Jeremy Allison
1cd8c9c41f Alphabetize.
Jeremy.
(This used to be commit 64301bc5f75283c948630d2b78d28e3869db39a2)
2002-01-16 20:25:23 +00:00
Jeremy Allison
0173911b46 Added CIFS UNIX extension code to client.
Jeremy.
(This used to be commit 794c3e2c76aae57d054e46b185def104ca02977c)
2002-01-16 20:13:28 +00:00
Jeremy Allison
24bdb14564 Fix name register bug with non-existent wins server.
Jeremy.
(This used to be commit 4e41780c21d9a6c056104f952e720a79c830c65e)
2002-01-16 19:23:05 +00:00
Jeremy Allison
493e6e6f47 At leadt don't lose this - I need to re-sync trans2.c between 2.2.x and
HEAD soon.
Jeremy.
(This used to be commit 2f57257558b67b4a5106fece269ce55643464683)
2002-01-16 02:42:47 +00:00
Martin Pool
fed604bfa3 Roll back PSTRING_SANCTIFY patch; just leave non-controversial type
and constness changes.
(This used to be commit cee0ec72746122c962e6c5278a736266a7f2c424)
2002-01-16 02:42:07 +00:00
Tim Potter
978f1ba98d Quieten some pointer cast warnings.
(This used to be commit 1906903f063de526045be68d19cf39de3c029c6f)
2002-01-16 02:31:53 +00:00
Andrew Tridgell
9f85d4ad5f much better support for organisational units in ADS join
(This used to be commit 7e876057d5e392f85e6fdb0f2c233b0fe76df688)
2002-01-16 02:22:30 +00:00
Martin Pool
3fee2ac712 Roll back PSTR insertion.
Just leave the fstrcpy/pstrcpy bugfix, and conversion to pstr_sprintf
rather than manual calculation of length.
(This used to be commit e38e7a2bdcf2901359035ac4aa79ebf33599e0c8)
2002-01-16 02:20:34 +00:00
Tim Potter
bf7c56665c Merge of name_status_find() debugs.
(This used to be commit cfac669017afa763100e335d1516fbed18049e00)
2002-01-16 01:41:30 +00:00
Jim McDonough
b5f5861225 Fix from 2.2. It didn't break on HEAD because it isn't being compiled. Herb?
(This used to be commit 4fcaec53de18220ff6662f62a1430f67757cdcc5)
2002-01-15 17:58:59 +00:00
Jeremy Allison
5fa0da0ba5 Missing assign fix from Bernt Nilsson bkn@ida.liu.se.
Jeremy.
(This used to be commit adf24a90e8b4d970d71fa8a6854edcf6deff9688)
2002-01-15 16:20:25 +00:00
Andrew Bartlett
c402fd6b79 For some reason I wasn't thinking about failure cases this morning...
Anyway, this makes it slightly sane, but we may decide to smb_panic() here
instead.

Andrew Bartlett
(This used to be commit 724109a33bf2f06bcb97cdd31c0442c6035ff6a6)
2002-01-15 05:15:22 +00:00
Martin Pool
1c639ca28e Convert to the new pstring interface. This diff is a pretty good
example of the scope of change the new pstrings would entail:
basically inserting PSTR() or FSTR() everywhere you need to coerce one
to a char*.

It's also a good example of the kind of bug we might catch: on about
line 540, we were doing a pstrcpy into an fstring, which might
overflow.  It's not a problem in this particular case, but it is in
general.
(This used to be commit 5a403da4a735a8fb8d118a0a67f3a15127152e18)
2002-01-15 02:15:58 +00:00
Martin Pool
0d3e258fd1 Split pstring definitions into their own header.
(This used to be commit 04e3082f7d45c1b304adff5a46106136cff0e09e)
2002-01-15 02:11:55 +00:00
Martin Pool
a276e917d8 Integrate with PSTRING_SANCTIFY.
(This used to be commit 20a03facb6acf6329acc1645d4e9ead863a1a57c)
2002-01-15 02:10:50 +00:00
Martin Pool
17745322ab #ifdef variable that's not used without dmalloc
(This used to be commit bf513668cb76fd20b04b8142c86c263280b05bb6)
2002-01-15 01:49:06 +00:00
Martin Pool
37d20e29a3 Add constness to parameters
(This used to be commit e0105974c06e210e7565555d4b673c484de32907)
2002-01-15 01:45:26 +00:00
Herb Lewis
4ce7b42ee0 adding wins commands to winbindd - will check in the rest of the changes
after further testing in 2.2 branch.
(This used to be commit d5cdbc7e4ff48273bd7616694eef98c61e6f1f33)
2002-01-15 01:42:57 +00:00
Martin Pool
9964e1f966 Add constness to parameters
(This used to be commit a61abaec063d00afe13ce0baa356245fb6e21bc0)
2002-01-15 01:38:05 +00:00
Martin Pool
df3d5b3556 Add constness to filenames passed to functions.
(This used to be commit 8d106dc1f4a51112516d72ae68747ca6b5b904b7)
2002-01-15 01:37:12 +00:00
Andrew Bartlett
90558370ab Commit the auth associated changes I missed from the last commit.
Also set the default value of all the allocated strings to "" to avoid changing
the interface (becouse pdb_get...() would point to a null string, rather than a
null pointer and parts of samba rely on that).

Andrew Bartlett
(This used to be commit 5b4079f748e25f21162e21b439063249baf8dca6)
2002-01-15 01:14:58 +00:00
Andrew Bartlett
dbee612f71 Change the passdb interface to use allocated strings.
These strings are allocated using talloc(), either using its own memory context
stored on the SAM_ACCOUNT or one supplied by the caller.

The pdb_init_sam() and pdb_free_sam() function have been modifed so that a call
to pdb_free_sam() will either clean up (remove hashes from memory) and destroy
the TALLOC_CTX or just clean up depending on who supplied it.

The pdb_init_sam and pdb_free_sam functions now also return an NTSTATUS, and I
have modified the 3 places that actually checked these returns.

The only nasty thing about this patch is the small measure needed to maintin
interface compatability - strings set to NULL are actually set to "".

This is becouse there are too many places in Samba that do strlen() on these
strings without checking if they are NULL pointers.

A supp patch will follow to set all strings to "" in pdb_default_sam().

Andrew Bartlett
(This used to be commit 144345b41d39a6f68d01f62b7aee64ca0d328085)
2002-01-15 01:02:13 +00:00
Andrew Bartlett
22e7da0a3d rerun autoconf
(This used to be commit d6bd9f1005496753333c3d8dec5e1a8069f1ce7b)
2002-01-14 22:11:44 +00:00
Andrew Bartlett
6894c42b91 I like --enable-developer, but I find it rather usless when all it gets me is a
screen-full of kerberos warnings.

This is almost as good, and I can actually see the Samba warnings.

Andrew Bartlett
(This used to be commit 35a6275e186cbd7b1f2190265b47112f1d082c06)
2002-01-14 22:11:01 +00:00
Andrew Bartlett
d76478f0a7 Initialise cli variables and try not to do a cli_shutdown() of uninitialsed
memory.

The winbind connection caching code isn't exactly a plesent beast, and there is
more work that needs to be done to nail this properly.

Andrew Bartlett
(This used to be commit dd40ce54b7f170854d63e08ac737f1b4306bd95b)
2002-01-14 22:08:47 +00:00
Andrew Bartlett
dd0f0f043f Fix a segfault in auth/auth_domain.c error cases.
This occured when the attempt to contact the PDC failed.  The connection code
has already shut down the connection, and 'free'ed the cli or has never
initialised it in the first place.

Andrew Bartlett
(This used to be commit 37ce7630434c1afae5164c64438f428dd8e1b731)
2002-01-14 21:52:25 +00:00