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

6647 Commits

Author SHA1 Message Date
Jeremy Allison
08019e8a33 Separate out get_user_home_dir() from get_user_home_service_dir().
Jeremy.
(This used to be commit c1b97226db)
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 0fcca6c627)
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 16fcbf3c1c)
2002-01-16 21:27:57 +00:00
Jeremy Allison
1cd8c9c41f Alphabetize.
Jeremy.
(This used to be commit 64301bc5f7)
2002-01-16 20:25:23 +00:00
Jeremy Allison
0173911b46 Added CIFS UNIX extension code to client.
Jeremy.
(This used to be commit 794c3e2c76)
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 4e41780c21)
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 2f57257558)
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 cee0ec7274)
2002-01-16 02:42:07 +00:00
Tim Potter
978f1ba98d Quieten some pointer cast warnings.
(This used to be commit 1906903f06)
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 7e876057d5)
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 e38e7a2bdc)
2002-01-16 02:20:34 +00:00
Tim Potter
bf7c56665c Merge of name_status_find() debugs.
(This used to be commit cfac669017)
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 4fcaec53de)
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 adf24a90e8)
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 724109a33b)
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 5a403da4a7)
2002-01-15 02:15:58 +00:00
Martin Pool
0d3e258fd1 Split pstring definitions into their own header.
(This used to be commit 04e3082f7d)
2002-01-15 02:11:55 +00:00
Martin Pool
a276e917d8 Integrate with PSTRING_SANCTIFY.
(This used to be commit 20a03facb6)
2002-01-15 02:10:50 +00:00
Martin Pool
17745322ab #ifdef variable that's not used without dmalloc
(This used to be commit bf513668cb)
2002-01-15 01:49:06 +00:00
Martin Pool
37d20e29a3 Add constness to parameters
(This used to be commit e0105974c0)
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 d5cdbc7e4f)
2002-01-15 01:42:57 +00:00
Martin Pool
9964e1f966 Add constness to parameters
(This used to be commit a61abaec06)
2002-01-15 01:38:05 +00:00
Martin Pool
df3d5b3556 Add constness to filenames passed to functions.
(This used to be commit 8d106dc1f4)
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 5b4079f748)
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 144345b41d)
2002-01-15 01:02:13 +00:00
Andrew Bartlett
22e7da0a3d rerun autoconf
(This used to be commit d6bd9f1005)
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 35a6275e18)
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 dd40ce54b7)
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 37ce763043)
2002-01-14 21:52:25 +00:00
Jeremy Allison
9e007457e4 Removed MAXSTATUS which was set incorrectly - thus causing tdb traversal
of the connections db on smbd startup. This should fix the Solaris large
load bug.... (fingers crossed).
Jeremy.
(This used to be commit 5b2b9c25af)
2002-01-14 19:34:28 +00:00
Martin Pool
3353223b47 FIXME We should turn the global list off when using Insure++,
otherwise all the memory will be seen as still reachable.
(This used to be commit 682e7cd394)
2002-01-14 06:51:34 +00:00
Martin Pool
6059f40763 Move local variable to avoid warning when compiled without GSSAPI.
(This used to be commit 312c6d906e)
2002-01-14 06:34:53 +00:00
Martin Pool
1b6c848c10 PSTRING_SANCTIFY:
If you define this, pstring and fstring become distinguished types, so
that it's harder to accidentally overflow them by for example passing
an fstring on the lhs of pstrcpy.

The types are defined as one-element union arrays so that with
"fstring f" the name "f" will be a pointer and with a big hammer you
can cast it to (char *).  So code that tries to just use it directly
will get a loud warning, but hopefully nothing worse.

To pass them to non-pstring-aware functions, use PSTR and check that
the function takes a const.  They should almost never be modified
except by special calls.  In those unusual cases, use PSTR_MUTABLE.

This is off by default so as not to produce too many warnings.  As the
code is vetted it can become the default.
(This used to be commit ca233bc8b3)
2002-01-14 06:15:07 +00:00
Tim Potter
cb4658d419 Removed fprintf(stderr, ...); calls which should not be present in library
functions.
(This used to be commit e69a22290e)
2002-01-14 02:22:31 +00:00
Andrew Bartlett
f7a657721a A couple of coding syle updates to follow the re-indent.
(This used to be commit 7417d6f931)
2002-01-13 12:37:01 +00:00
Andrew Bartlett
fef35c5ce0 Re-indent these two functions to make it actually possible to understand their
contents...

Andrew Bartlett
(This used to be commit e20d69d518)
2002-01-13 12:33:42 +00:00
Andrew Tridgell
2f4a6d60ef don't try to allocate zero bytes
(This used to be commit d09616da68)
2002-01-13 11:46:04 +00:00
Andrew Bartlett
0d1ecbbb73 I'm doing some things towards the NamedPipes game with lckl and he has asked me
to move this from being a static to matching its mate in lib/util_sock.c.

In any case, this should discorage anybody from using the 'wrong' version of
this function.  (ie the one from TNG, which needs a bit more error checking
depending on use).

Andrew Bartlett
(This used to be commit e6a3a01f79)
2002-01-13 11:13:54 +00:00
Andrew Bartlett
e895b9004e Many thanks to Alexander Bokovoy <a.bokovoy@sam-solutions.net>.
This work was sponsored by Optifacio Software Services, Inc.

Andrew Bartlett

(various e-mails announcements merged into some form of commit message below:)

This patch which adds basics of universal groups support
into Samba 3. Currently, only Winbind with RPC calls supports this, ADS
support requires additional (possibly huge) work on KRB5 PAC. However,
basic infrastructure is here.

This patch adds:

1. Storing of universal groups for particular user logged into Samba
software (smbd/ two winbind-pam methods) into netlogon_unigrp.tdb as array
of uint32 supplemental group rids keyed as DOMAIN_SID/USER_RID in tdb.

2. Fetching of unversal groups for given user rid and domain sid from
netlogon_unigrp.tdb.

Since this is used in both smbd and winbindd, main code is in
source/lib/netlogon_uingrp.c. Dependencies are added to AUTH_OBJ as
UNIGRP_OBJ and WINBINDD_OBJ as UNIGRP_OBJ.

This patch has had a few versions, the final version in particular:

Many thanks to Andrew Bartlett for critics and comments, and partly
rewritten code.

New:
- updated fetching code to changed byte order macros
- moved functions to proper namespace
- optimized memory usage by reusing caller's memory context
- enhanced code to more follow Samba coding rules

Todo:
- proper universal group expiration after timeout
(This used to be commit 80c2aefbe7)
2002-01-12 23:57:10 +00:00
Simo Sorce
b79fa88b4d updates from 2.2
(This used to be commit 398b4ff0d4)
2002-01-12 23:12:13 +00:00
Jeremy Allison
c9d350a736 Added PRINTER_INFO_4/PRINTER_INFO_5, we're seeing level 5 requested on the wire... so.
Jeremy.
(This used to be commit b63b762978)
2002-01-12 02:37:54 +00:00
Andrew Bartlett
973c0b3257 Thanks to vance for spotting the missing Makefile.in commit.
This should make things a little happier...

Andrew Bartlett
(This used to be commit 6ce467a65f)
2002-01-12 02:06:17 +00:00
Andrew Bartlett
e3e3144417 Move all the pdb_get...() and pdb_set...() functions to a new file.
This brings passdb.c down to a much more manageable ~1100 lines and makes it a
little easier to comprehend whats going on here.

Andrew Bartlett
(This used to be commit 28d5ab269c)
2002-01-12 01:55:09 +00:00
Jeremy Allison
68245b54cd Added the O_NOFOLLOW flag if follow symlinks is set off.
Jeremy.
(This used to be commit 4f1f5f28b5)
2002-01-12 00:50:01 +00:00
Jeremy Allison
1d40138232 Round and round we go....
Jeremy.
(This used to be commit 2603ab3c68)
2002-01-11 23:33:12 +00:00
Jeremy Allison
b741f6b04c Latest attempt at changeid.
Jeremy.
(This used to be commit 24ee18c77e)
2002-01-11 21:52:46 +00:00
Jeremy Allison
d6823366b8 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
(This used to be commit 01ff6ce496)
2002-01-11 19:10:25 +00:00
Andrew Tridgell
27655be3c1 fixed a crash bug in domain auth caused by an uninitialised nt_status
(This used to be commit 0b0b937b58)
2002-01-11 13:14:28 +00:00
Andrew Tridgell
a78fd04681 fixed a crash in merge_aces()
when we free curr_ace_outer we need to not try to use it again :)
(This used to be commit 1c5e19a418)
2002-01-11 11:26:31 +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 116c0a0e3b)
2002-01-11 10:05:34 +00:00