Jeremy Allison [Fri, 7 Mar 2003 19:46:51 +0000 (19:46 +0000)]
Missed parentheses around complex logic.
Jeremy.
Jeremy Allison [Fri, 7 Mar 2003 19:37:27 +0000 (19:37 +0000)]
Patch from Michael Steffens. In his own words :
-------------------------------------------------------------------------
I think there are basically two problem:
1. Windows clients do not always send ACEs for SMB_ACL_USER_OBJ, SMB_ACL_GROUP_OBJ,
and SMB_ACL_OTHER.
The function ensure_canon_entry_valid() is prepared for that, but tries
to "guess" values from group or other permissions, respectively, otherwise
falling back to minimum r-- for the owner. Even if the owner had full
permissions before setting ACL. This is the problem with W2k clients.
2. Function set_nt_acl() always chowns *before* attempting to set POSIX ACLs.
This is ok in a take-ownership situation, but must fail if the file is
to be given away. This is the problem with XP clients, trying to transfer
ownership of the original file to the temp file.
The problem with NT4 clients (no ACEs are transferred to the temp file, thus
are lost after moving the temp file to the original name) is a client problem.
It simply doesn't attempt to.
I have played around with that using posic_acls.c from 3.0 merged into 2.2.
As a result I can now present two patches, one for each branch. They
basically modify:
1. Interpret missing SMB_ACL_USER_OBJ, SMB_ACL_GROUP_OBJ, or SMB_ACL_OTHER
as "preserve current value" instead of attempting to build one ourself.
The original code is still in, but only as fallback in case current values
can't be retrieved.
2. Rearrange set_nt_acl() such that chown is only done before setting
ACLs if there is either no change of owning user, or change of owning
user is towards the current user. Otherwise chown is done after setting
ACLs.
It now seems to produce reasonable results. (Well, as far as it can. If
NT4 doesn't even try to transfer ACEs, only deliberate use of named default
ACEs and/or "force group" or the crystal ball can help :)
-------------------------------------------------------------------------
Jeremy.
Simo Sorce [Fri, 7 Mar 2003 18:26:24 +0000 (18:26 +0000)]
Some progress towards gums and tdbsam2
genparser works fine, and it is a marvelous tool to store objects in tdb :)
Andrew Bartlett [Fri, 7 Mar 2003 09:29:56 +0000 (09:29 +0000)]
Limit the number of SIDs that may be looked up, in line with existing code
for name->sid.
Andrew Bartlett [Fri, 7 Mar 2003 09:25:48 +0000 (09:25 +0000)]
safe_strcpy() -> fstrcpy() fix, and a cleanup to how rpcclient calls the
IP address resolving code.
Jeremy Allison [Fri, 7 Mar 2003 00:34:43 +0000 (00:34 +0000)]
Fix noticed by Corny.Bondad@hp.com. Ensure we free up memory on error exit.
Jeremy.
Jeremy Allison [Fri, 7 Mar 2003 00:30:29 +0000 (00:30 +0000)]
Found at Connectathon, .NET RC1 arranges trans/trans2/nttrans parameters
differently to W2K, cope with this.
Jeremy.
Jelmer Vernooij [Thu, 6 Mar 2003 17:09:07 +0000 (17:09 +0000)]
Add documentation on line returned by 'add printer command' script
Jelmer Vernooij [Thu, 6 Mar 2003 17:05:33 +0000 (17:05 +0000)]
Redirect to printer docs for removed options
Gerald Carter [Thu, 6 Mar 2003 16:06:12 +0000 (16:06 +0000)]
add #define for the max device name length in a DEVICEMODE
Andrew Bartlett [Thu, 6 Mar 2003 10:37:51 +0000 (10:37 +0000)]
Make smbtorture use the same cli_full_connection() framework as the rest of
Samba. This fixes things like not doing *SMBSERVER etc.
Andrew Bartlett
Andrew Bartlett [Thu, 6 Mar 2003 08:24:39 +0000 (08:24 +0000)]
more off-by-one safe_strcpy()
Andrew Bartlett [Thu, 6 Mar 2003 07:55:48 +0000 (07:55 +0000)]
More safe_strcpy() off-by-one bug fixes. (mostly moves to pstrcpy()/fstrcpy())
Andrew Bartlett
Martin Pool [Thu, 6 Mar 2003 07:36:08 +0000 (07:36 +0000)]
FIXME about crash on failure case.
Richard Sharpe [Wed, 5 Mar 2003 23:55:11 +0000 (23:55 +0000)]
Add *SMBSERVER fallback code to smbtorture ...
Richard Sharpe [Wed, 5 Mar 2003 23:29:36 +0000 (23:29 +0000)]
Add code to allow us to specify the port to connect on when performing
a test ...
Andrew Bartlett [Wed, 5 Mar 2003 09:40:08 +0000 (09:40 +0000)]
Use new configure test to turn on this automated test for correct string
function usage.
Andrew Bartlett
Andrew Bartlett [Wed, 5 Mar 2003 09:36:41 +0000 (09:36 +0000)]
A couple more fixes for fstrcpy() into a malloced region. In this case it's
all perfectly legit - the region is an fstring in length, but might not
always be, and it is the last peice of code to fail my automated test.
Andrew Bartlett
Andrew Bartlett [Wed, 5 Mar 2003 09:33:43 +0000 (09:33 +0000)]
Add a test for a useful property of the compiler - we can get link-time
failures for some compile-time properties this way.
Andrew Bartlett
Andrew Bartlett [Wed, 5 Mar 2003 08:49:56 +0000 (08:49 +0000)]
also ignore the autom4te-2.53.cache
Andrew Bartlett [Wed, 5 Mar 2003 08:48:08 +0000 (08:48 +0000)]
This file has not been maintained for a while - if we really want this
behaviour we should seperate -g from --enable-developer, and allow developers
to also select --enable-debug if they want.
Andrew Bartlett
Martin Pool [Wed, 5 Mar 2003 05:19:35 +0000 (05:19 +0000)]
lp_string: Add note about dodgy StrnCpy use.
Tim Potter [Wed, 5 Mar 2003 05:14:19 +0000 (05:14 +0000)]
Use PRINTER_ALL_ACCESS instead of MAXIMUM_ALLOWED_ACCESS in setprinter
command. From Ronan Waide <waider@waider.ie>.
Jeremy Allison [Wed, 5 Mar 2003 01:34:37 +0000 (01:34 +0000)]
More const fixes.
Jeremy.
Jeremy Allison [Wed, 5 Mar 2003 01:30:26 +0000 (01:30 +0000)]
Writable string const fixes.
Jeremy.
Jeremy Allison [Wed, 5 Mar 2003 00:54:07 +0000 (00:54 +0000)]
Connectathon fix. W2K -> W2K over port 445 doing a tconX does the full
\\server\share syntax, not just a "share" tconX syntax. This broke interop
with a vendor.
Jeremy.
Andrew Bartlett [Tue, 4 Mar 2003 09:33:34 +0000 (09:33 +0000)]
Fix another 'off by one' bug with safe_strcpy(). It is unclear if the intent
was to limit the string to 31 or 32 characters (excluding the null term), so
I've assumed for now that 32 is fine, as this matches current behaviour (well, current behaviour would crash, but anyway...)
Jerry: Can you look at this for me?
Andrew Bartlett
Andrew Bartlett [Mon, 3 Mar 2003 23:53:35 +0000 (23:53 +0000)]
Another pstrcpy() into malloc()ed buffer fix.
Andrew Bartlett
Jeremy Allison [Mon, 3 Mar 2003 20:12:07 +0000 (20:12 +0000)]
Const warning fixes.
Jeremy.
Jeremy Allison [Mon, 3 Mar 2003 19:53:04 +0000 (19:53 +0000)]
dlsym takes a const char *.
Jeremy.
Jeremy Allison [Mon, 3 Mar 2003 19:36:16 +0000 (19:36 +0000)]
Fix "might be used uninitialised" warnings.
Jeremy.
Richard Sharpe [Mon, 3 Mar 2003 17:43:33 +0000 (17:43 +0000)]
Do my janitorial duties to encourage others to do so.
Fix lingering large offset problems in smbtar etc.
Gerald Carter [Mon, 3 Mar 2003 17:33:57 +0000 (17:33 +0000)]
* always report ourselves as a Windows 2000 print server (even
without ADS support)
* add "MinorVersion" print server data key and comment on "OSVersion"
Gerald Carter [Mon, 3 Mar 2003 16:34:19 +0000 (16:34 +0000)]
* CR1868: only send a change notify message if we have something
that changed that the client is monitoring.
* couple of comments abnout how we need to validate driver names
on SetPrinter() and AddPrinter()
* up the debug level on some overly verbose dev mode parsing messages
Andrew Bartlett [Mon, 3 Mar 2003 09:16:21 +0000 (09:16 +0000)]
Try the PASSWD environment variable if we don't have one from the command line.
Andrew Bartlett [Mon, 3 Mar 2003 09:12:40 +0000 (09:12 +0000)]
Fixes to the vfs_fake_perms modules - we only need to specify the VFS
functions that we actually modify.
Also a better implementation of the stat() and fstat() functions.
Andrew Bartlett
Andrew Bartlett [Mon, 3 Mar 2003 08:35:49 +0000 (08:35 +0000)]
Add const
Andrew Tridgell [Sat, 1 Mar 2003 10:47:38 +0000 (10:47 +0000)]
i forgot to commit the privilege db init call
Jeremy Allison [Sat, 1 Mar 2003 02:39:14 +0000 (02:39 +0000)]
Added limit to number of jobs enumerated. Set to 0 (means no limit).
Yes I will add the docs....
Jeremy.
Andrew Tridgell [Sat, 1 Mar 2003 01:07:18 +0000 (01:07 +0000)]
the new DEVELOPER checks for string overflows have (as expected)
broken a lot of stuff. These two macros are meant to make life easier
when fixing these bugs. I'm guessing we will see more macros like
this (eg. fstrcpy_base)
Jeremy Allison [Sat, 1 Mar 2003 00:48:09 +0000 (00:48 +0000)]
Ensure added jobs increment total_jobs.
Jeremy.
Jelmer Vernooij [Fri, 28 Feb 2003 08:47:22 +0000 (08:47 +0000)]
Fix HTTP error codes (patch by Vance Lankhaar)
Andrew Tridgell [Fri, 28 Feb 2003 06:03:35 +0000 (06:03 +0000)]
fixed a crash bug in the new winbindd 'sids rule!' code
Martin Pool [Fri, 28 Feb 2003 05:34:19 +0000 (05:34 +0000)]
Doxygen janitor: add note that strequal is in fact case-insensitive.
Andrew Tridgell [Fri, 28 Feb 2003 04:36:08 +0000 (04:36 +0000)]
- added help on -P option
- added general options to 'net -h' help
Martin Pool [Fri, 28 Feb 2003 04:21:55 +0000 (04:21 +0000)]
Doxygen janitor
Martin Pool [Fri, 28 Feb 2003 04:17:30 +0000 (04:17 +0000)]
Doxygen janitor: fix parameter names, grammar, tag names.
Martin Pool [Fri, 28 Feb 2003 04:11:28 +0000 (04:11 +0000)]
Doxygen janitor: rpc_resolve_dc parameter is spelled "trust_passwd"
Martin Pool [Fri, 28 Feb 2003 04:09:58 +0000 (04:09 +0000)]
Doxygen janitor: check_domain_match parameter is spelled
"auth_context".
Martin Pool [Fri, 28 Feb 2003 04:06:56 +0000 (04:06 +0000)]
Fix comment typo
Martin Pool [Fri, 28 Feb 2003 03:59:47 +0000 (03:59 +0000)]
Remove reference to "mainpage.dox" and CodingStandards, which have
been removed.
Put subdirectory names in file list, so we get lib/util_chr.c, not
just util_chr.c.
Martin Pool [Fri, 28 Feb 2003 03:51:25 +0000 (03:51 +0000)]
Add a comment about the meaning of samba's internal character set and
how this interacts with it.
Martin Pool [Fri, 28 Feb 2003 03:34:18 +0000 (03:34 +0000)]
Add simple test harness that exposes StrCaseCmp for testing.
Jim McDonough [Fri, 28 Feb 2003 03:29:03 +0000 (03:29 +0000)]
cleanup some compiler warnings
Jim McDonough [Fri, 28 Feb 2003 03:21:22 +0000 (03:21 +0000)]
Improve net ads lookup:
- More info is printed
- (grand)child domains handled properly
Thanks to Anthony Liguori (aliguori@us.ibm.com)
Jeremy Allison [Fri, 28 Feb 2003 00:26:20 +0000 (00:26 +0000)]
*Excellent* patch from Michael Steffens <michael_steffens@hp.com> to limit
the unix domain sockets used by winbindd (also solves FD_SETSIZE problem
in winbindd to boot !). Adds a "last_access" field to winbindd connections,
and will close the oldest idle connection once the number of open connections
goes over WINBINDD_MAX_SIMULTANEOUS_CLIENTS (defined in local.h as 200
currently).
Jeremy.
Gerald Carter [Thu, 27 Feb 2003 23:52:37 +0000 (23:52 +0000)]
don't forget the NULL
Gerald Carter [Thu, 27 Feb 2003 23:24:26 +0000 (23:24 +0000)]
and the winner of "i should have just written it in assembly
is..."
don't use pstrcpy() when you are not dealing with pstrings.
Gerald Carter [Thu, 27 Feb 2003 21:37:54 +0000 (21:37 +0000)]
don't pass NULL pointers to strcmp()
Gerald Carter [Thu, 27 Feb 2003 21:21:02 +0000 (21:21 +0000)]
additional fix for CR 601
* distinguish WinXP from Win2k
* add a 1/3 of a second delay in OpenPrinter
in order to trigger a LAN/WAN optimization in
2k clients.
Martin Pool [Thu, 27 Feb 2003 05:53:25 +0000 (05:53 +0000)]
Doxygen janitor
Jelmer Vernooij [Thu, 27 Feb 2003 02:28:26 +0000 (02:28 +0000)]
Remove documentation for obsolete parameters, but add a note in 'upgrading-to-3.0'
Jelmer Vernooij [Thu, 27 Feb 2003 02:17:54 +0000 (02:17 +0000)]
We now use <anchor/> instead of just <anchor> (strict XML syntax)
Jelmer Vernooij [Thu, 27 Feb 2003 01:54:41 +0000 (01:54 +0000)]
- Rename 'modules = ' to 'preload modules = '
- Add smb_probe_module()
- Add init_modules()
- Call these functions
Andrew Bartlett [Thu, 27 Feb 2003 01:05:12 +0000 (01:05 +0000)]
Fix possible memory leak on failure.
Jeremy Allison [Thu, 27 Feb 2003 00:43:23 +0000 (00:43 +0000)]
Fix to allow blocking lock notification to be done rapidly (no wait
for smb -> smb lock release). Adds new PENDING_LOCK type to lockdb
(does not interfere with existing locks).
Jeremy.
Andrew Bartlett [Wed, 26 Feb 2003 12:31:17 +0000 (12:31 +0000)]
Add -Wwrite-strings to our --enable-developer settings.
We have compiled relitivly 'clean' with this setting since I did a massive
cleanup last month. This should help us stay that way.
Andrew Bartlett
Andrew Bartlett [Wed, 26 Feb 2003 12:23:03 +0000 (12:23 +0000)]
Netlogon-unigroup changes needed for the winbind RID-to-SID conversion.
This changes the cache format, which will simply invalidate existing entries,
leaving them dead in the cache.
Andrew Bartlett
Andrew Bartlett [Wed, 26 Feb 2003 12:21:01 +0000 (12:21 +0000)]
Kill RID-only and domain+RID madness from winbind.
Now we deal with SIDs in almost all of winbind (a couple of limited exceptions
remain, but I'm looking into them - they use non-winbind structs ATM).
This has particular benifits in returning out-of-domain SIDs for group
membership (Need to look into this a bit more) as well as general code quality.
This also removes much of the complexity from the idmap interface, which now
only deals with mapping IDs, not with SID->domain translations.
Breifly tested, but needs more. Fixes some valgrind-found bugs from my
previous commit.
Winbind cache chagned to using SID strings in some places, as I could not
follow exactly how to save and restore multiple packed sids properly.
Andrew Bartlett
Martin Pool [Wed, 26 Feb 2003 06:19:16 +0000 (06:19 +0000)]
init_valid_table: Fix a memory leak that would lose the
dynamically-created valid table every time the configuration was
reloaded.
Tim Potter [Wed, 26 Feb 2003 00:52:41 +0000 (00:52 +0000)]
Merge from appliance:
>Another hopeful fix for CR#1168. Change the RPC used in querying
>domain users from QueryDispInfo to EnumDomainUsers. Hopefully this
>will fix the random dropouts that keep occuring when listing large
>domains.
>
>My thought is that since QueryDispInfo is only used in the NT user
>manager it may have a bug with large domains. A more commonly used
>RPC may not have such problems.
Tim Potter [Tue, 25 Feb 2003 23:35:25 +0000 (23:35 +0000)]
Fix compiler warning.
Tim Potter [Tue, 25 Feb 2003 23:34:57 +0000 (23:34 +0000)]
More const fixes and flow on fixes from yesterday's const-fest.
Tim Potter [Tue, 25 Feb 2003 23:30:46 +0000 (23:30 +0000)]
Fix unused variable warning when ENCTYPE_ARCFOUR_HMAC is not defined.
Tim Potter [Tue, 25 Feb 2003 23:28:28 +0000 (23:28 +0000)]
Fix breakage done by myself yesterday.
Gerald Carter [Tue, 25 Feb 2003 20:51:23 +0000 (20:51 +0000)]
Progress on CR 601
cache the printer_info_2 with the open printer handle.
cache is invalidated on a mod_a_printer() call **on that smbd**.
Yes, this means that the window for admins to step on each other
from different clients just got larger, but since handles a generally
short lived this is probably ok.
Tim Potter [Tue, 25 Feb 2003 06:24:13 +0000 (06:24 +0000)]
Fixed up some const related compiler warnings.
Andrew Bartlett [Tue, 25 Feb 2003 05:49:24 +0000 (05:49 +0000)]
After some comments from tridge, clean the new usergroups code into a helper
function.
Andrew Bartlett
Andrew Bartlett [Tue, 25 Feb 2003 03:30:39 +0000 (03:30 +0000)]
For some reason some attributes in ADS do not appear (and are not available)
in general searches, but only if searching for the DN only.
In my case, it was the tokenGroups attribute that caused me trouble, hence
this patch.
Andrew Bartlett
Andrew Bartlett [Tue, 25 Feb 2003 02:23:19 +0000 (02:23 +0000)]
tokenGroups are SIDs, so dump them as such.
Andrew Bartlett [Tue, 25 Feb 2003 02:20:46 +0000 (02:20 +0000)]
Fix a really nasty bug where some users in AD domains (particularly child
domains) would not have the tokenGroups or memberOf attributes filled in.
This would cause a user to have no supplementary group membership.
Detect this by the fact that the primaryGid must be present in the tokenGroups,
and if it isn't (ie, if there is no tokenGroups at all), do a server-side
search on all groups using the 'member' attribute and the user's DN.
Andrew Bartlett
Andrew Bartlett [Mon, 24 Feb 2003 22:25:19 +0000 (22:25 +0000)]
Whenever we have a password, use the in-memory ccache. This fixes a bug where
we were overwriting the user's ccache with the machine password (the -P option).
Andrew Bartlett
Andrew Bartlett [Mon, 24 Feb 2003 21:07:03 +0000 (21:07 +0000)]
Clean up non-krb5 breakages from my modifications to luke howard's patch.
Andrew Bartlett
Andrew Bartlett [Mon, 24 Feb 2003 11:24:27 +0000 (11:24 +0000)]
Finish removing setenv replacements from smbwrapper.
Andrew Bartlett [Mon, 24 Feb 2003 11:23:15 +0000 (11:23 +0000)]
Move off-by-one buggy malloc()/safe_strcpy() combination to strdup() instead.
Andrew Bartlett
Andrew Bartlett [Mon, 24 Feb 2003 11:16:27 +0000 (11:16 +0000)]
typo
Andrew Bartlett [Mon, 24 Feb 2003 11:09:21 +0000 (11:09 +0000)]
Patch from Luke Howard to add mutual kerberos authentication, and SMB session
keys for kerberos authentication.
Andrew Bartlett
Andrew Bartlett [Mon, 24 Feb 2003 10:35:24 +0000 (10:35 +0000)]
setenv takes 3 arguments...
Andrew Bartlett [Mon, 24 Feb 2003 09:46:01 +0000 (09:46 +0000)]
If it's a pstring, use pstrcpy().
Andrew Bartlett [Mon, 24 Feb 2003 09:10:41 +0000 (09:10 +0000)]
Fix off-by-one bugs, and move to strdup() rather than malloc()/strcpy().
Andrew Bartlett
Tim Potter [Mon, 24 Feb 2003 04:59:15 +0000 (04:59 +0000)]
Quieten compiler warning.
Martin Pool [Mon, 24 Feb 2003 04:42:24 +0000 (04:42 +0000)]
Merge documentation from 3_0.
Andrew Bartlett [Mon, 24 Feb 2003 03:45:02 +0000 (03:45 +0000)]
Always initialise
Tim Potter [Mon, 24 Feb 2003 02:12:39 +0000 (02:12 +0000)]
Merge:
> Exit path cleanup for cli_samr_enum_dom_users()
Andrew Bartlett [Mon, 24 Feb 2003 02:11:32 +0000 (02:11 +0000)]
Add const
Andrew Bartlett [Mon, 24 Feb 2003 01:13:31 +0000 (01:13 +0000)]
Fix 2 off-by-one bugs in the use of malloc()ed strings and safe_strcpy().
safe_strcpy() isn't particularly safe (this has been noted before) as it does
not take the size of the buffer, but instead the size of the buffer *minus 1*
The locking.c fix was causing segfaults on machines running with
--enable-developer, and was tracked down thanks to the fact that vance's build
farm machine runs with such an option, and smbtorture's DIR1 test hits this
bug very well.
(The --enable-developer code writes to the last byte of the string, to check
for incorrect use of safe_strcpy()).
Andrew Bartlett
Simo Sorce [Sun, 23 Feb 2003 18:08:07 +0000 (18:08 +0000)]
forgot the altered include file
Simo Sorce [Sun, 23 Feb 2003 17:40:43 +0000 (17:40 +0000)]
move genparser to use talloc contexts instead of [m|c|re]alloc() and free()s
Andrew Bartlett [Sat, 22 Feb 2003 20:11:29 +0000 (20:11 +0000)]
Make sure we set the error code to indicate failure...
Andrew Bartlett
Andrew Bartlett [Sat, 22 Feb 2003 20:01:00 +0000 (20:01 +0000)]
See if I can make this look slightly like C. It compiled locally, honest...
Andrew Bartlett