Jeremy Allison [Tue, 9 Mar 2004 23:26:58 +0000 (23:26 +0000)]
Fix dfs referrals - don't use check_path_syntax. Also use mb char calls in
dfs code.
Jeremy.
Rafal Szczesniak [Tue, 9 Mar 2004 21:47:49 +0000 (21:47 +0000)]
Yet another '\n' termination of debug message.
rafal
Rafal Szczesniak [Tue, 9 Mar 2004 18:58:19 +0000 (18:58 +0000)]
Fix to debug message lacking termination with '\n'.
rafal
Gerald Carter [Tue, 9 Mar 2004 15:29:16 +0000 (15:29 +0000)]
fix build with gcc 2.96 and --with-developer
Andrew Bartlett [Tue, 9 Mar 2004 11:15:44 +0000 (11:15 +0000)]
Given how core this code is, I figure it should have it's own testsuite.
Big thanks to tpot and mbp for showing how easy it can be to write a simple
unit test, and for providing the STF.
This also changes the strstr_m() code to use strstr_w() (avoiding
duplication) and fixes it so that it passes the STF.
(We now always restart before doing the unicode run, until sombody can
show me why the testsuite is wrong).
Andrew Bartlett
Andrew Bartlett [Tue, 9 Mar 2004 09:56:33 +0000 (09:56 +0000)]
JRA's recent strstr_m work really badly broke our string_sub code.
For example:
strstr_m("%v foo bar", "%v") would fail...
only strstr_m("foo %v", "%v") could work.
I wonder what else this broke...
Fix is to move to using strncmp() inside the strstr_m function.
Tested on ASCII only.
Andrew Bartlett
Jeremy Allison [Tue, 9 Mar 2004 00:17:14 +0000 (00:17 +0000)]
Added strstr_m() function. Use in all places where we might run into mb
(should fix the mb service name problem, can't remember the bugid).
Jeremy.
Jeremy Allison [Mon, 8 Mar 2004 21:54:54 +0000 (21:54 +0000)]
Fix assumption about following directory sep in check_path_syntax(). We
need to try and convert 1 byte, then 2 bytes if that fails. Fixes bug
reported by Simo.
Jeremy.
Volker Lendecke [Sun, 7 Mar 2004 08:22:06 +0000 (08:22 +0000)]
Get us a little closer to Windows LSA semantics.
A windows DC does not reply to DCNAME\\Administrator, only to
DOMAIN\\Administrator. Fix that.
Without winbind we are wrong as domain members, we should forward the request
DOMAIN\\Username to the DC on behalf of the asking client. Winbind fixes that
nicely.
Volker
Volker Lendecke [Sun, 7 Mar 2004 08:18:35 +0000 (08:18 +0000)]
Mention wb_delgrpmem fix
Volker Lendecke [Sun, 7 Mar 2004 08:16:10 +0000 (08:16 +0000)]
This might not be used a lot and might not survive for long, but at least it
should work as expected :-)
Fix wb_delgrpmember.
Volker
Tim Potter [Sun, 7 Mar 2004 01:14:11 +0000 (01:14 +0000)]
Fix typo.
Tim Potter [Sun, 7 Mar 2004 00:50:37 +0000 (00:50 +0000)]
Merge from HEAD.
Tim Potter [Sun, 7 Mar 2004 00:09:36 +0000 (00:09 +0000)]
Merge from HEAD.
Jeremy Allison [Fri, 5 Mar 2004 22:32:45 +0000 (22:32 +0000)]
Several mb tidyups - getting ready to address the XXX_sub function.
Jeremy.
Gerald Carter [Fri, 5 Mar 2004 18:37:01 +0000 (18:37 +0000)]
BUG 488: fix the 'show client in col 1' button and corrctely enumerate active connections
Gerald Carter [Fri, 5 Mar 2004 17:39:38 +0000 (17:39 +0000)]
fix compiler warning
Jelmer Vernooij [Fri, 5 Mar 2004 17:17:31 +0000 (17:17 +0000)]
Add -O (for writing downloaded files to standard out) based on patch by
Bas van Sisseren <bas@dnd.utwente.nl>
Gerald Carter [Fri, 5 Mar 2004 15:37:08 +0000 (15:37 +0000)]
bring WHATSNEW back up to date
Jeremy Allison [Fri, 5 Mar 2004 01:37:12 +0000 (01:37 +0000)]
all_string_sub() is broken as it doesn't handle mb chars correctly (and
so breaks when substitution '/' and '\'). It's used by unix_clean_name(),
which is used by reduce_name, which is used by check_name() (phew!).
Now that we know all filenames passed to check_name() are in a "good"
format (no double slashes, all '\\' chars translated to '/' etc.) due
to the new check_path_syntax() we can avoid calling reduce_name unless
widelinks are denied. After this check-in I can fix all_string_sub() to
handle mb chars correctly as it won't be in the direct path in the
main path handling code.
Jeremy.
Jeremy Allison [Thu, 4 Mar 2004 18:55:37 +0000 (18:55 +0000)]
Fix my breakage of NT pipes from the previous patch (sorry). Use the
original srvstr_pull_buf() function to get the pipename not srvstr_get_path().
Jeremy.
Gerald Carter [Thu, 4 Mar 2004 18:34:45 +0000 (18:34 +0000)]
BUG 1015: patch from jmcd to fix statfs redeclaration of statfs struct on ppc
Gerald Carter [Thu, 4 Mar 2004 18:17:01 +0000 (18:17 +0000)]
BUG 1080: fix declaration of SMB_BIG_UINT
Volker Lendecke [Thu, 4 Mar 2004 17:57:21 +0000 (17:57 +0000)]
There's a specific error message NT_STATUS_ALIAS_EXISTS.
Volker Lendecke [Thu, 4 Mar 2004 17:51:29 +0000 (17:51 +0000)]
Another typo, sorry for samba-cvs spam :-)
Volker Lendecke [Thu, 4 Mar 2004 17:47:14 +0000 (17:47 +0000)]
Fix typo.
Volker
Jim McDonough [Thu, 4 Mar 2004 16:24:13 +0000 (16:24 +0000)]
Fix build farm, older compilers won't let you declare variables
right in the middle of the code.
I just love catching jra on stuff like this, after all the crap
I've done. :-)
Gerald Carter [Thu, 4 Mar 2004 15:59:11 +0000 (15:59 +0000)]
BUG 848: don't create winbind local users/groups that already exist in the tdb
Gerald Carter [Thu, 4 Mar 2004 15:18:36 +0000 (15:18 +0000)]
another fix for bug 761; don't default to bsd printing on linux
Jeremy Allison [Wed, 3 Mar 2004 23:14:23 +0000 (23:14 +0000)]
Added client "hardlink" commant to test doing NT rename with hard links.
Added hardlink_internals() code - UNIX extensions now use this too.
Jeremy.
Jeremy Allison [Wed, 3 Mar 2004 20:55:59 +0000 (20:55 +0000)]
Use a common function to parse all pathnames from the wire. This allows
much closer emulation of Win2k3 error return codes.
Jeremy.
Gerald Carter [Wed, 3 Mar 2004 17:56:29 +0000 (17:56 +0000)]
set log file to smbd.log for interaction with logrotate (BUG 503)
Jim McDonough [Wed, 3 Mar 2004 17:44:00 +0000 (17:44 +0000)]
more usrmgr fixes: display lockout timers in minutes, not seconds, for samr 2e
Jim McDonough [Wed, 3 Mar 2004 04:23:43 +0000 (04:23 +0000)]
quick for for usrmgr. unknown_6 is really max dimension of logon hours array. need to update passdb for this.
Jim McDonough [Tue, 2 Mar 2004 21:02:09 +0000 (21:02 +0000)]
Merge fields_present function from HEAD. Now, a field will not be updated
on setuserinfo levels which include this field, unless the corresponding
bit (defined in passdb.h) is turned on. Without this, newer versions
of usrmgr break us pretty bad.
Gerald Carter [Tue, 2 Mar 2004 18:10:12 +0000 (18:10 +0000)]
BUG 1129: patch from shiro@miraclelinux.com (Shiro Yamada) to install image files for SWAT
Jeremy Allison [Tue, 2 Mar 2004 18:07:06 +0000 (18:07 +0000)]
Janitorial duty for tpot - --with-fhs fix.
Jeremy.
Jim McDonough [Tue, 2 Mar 2004 18:04:16 +0000 (18:04 +0000)]
fix typo for callback bit
Gerald Carter [Tue, 2 Mar 2004 14:26:45 +0000 (14:26 +0000)]
allow the 'printing' parameter to be set on a per share basis.
The problem was that the current_printif struct was set during
print_backend_init() based on the 'printcap name'. So you could
not use cups and then override the setting for a specific printer
by setting 'printing = bsd' (a common setup for pdf generation
print services.
There is a subtle change in behavior in that the print
interface functions are selecting on the basis of lp_printing()
and not lp_printcap_name(), but the new behavior seems more
intuitive IMHO.
Gerald Carter [Tue, 2 Mar 2004 04:09:39 +0000 (04:09 +0000)]
BUG 761: read the config file before initialized default values for printing options
Gerald Carter [Mon, 1 Mar 2004 17:40:40 +0000 (17:40 +0000)]
BUG 692: patch from SATOH Fumiyasu <fumiya@miraclelinux.com> to correct truncation of share names and workgroup names
Gerald Carter [Mon, 1 Mar 2004 17:03:05 +0000 (17:03 +0000)]
BUG 1147; bad pointer case in get_stored_queue_info() causing seg fault
Volker Lendecke [Sun, 29 Feb 2004 16:34:33 +0000 (16:34 +0000)]
net_rpc.c: Don't complain if [add|del]mem was successful.
srv_samr_nt.c: Correctly report that a user is not member of an alias.
Volker
Volker Lendecke [Sun, 29 Feb 2004 12:47:45 +0000 (12:47 +0000)]
Print an informative error message if trying to add/remove members from
something not a group.
Volker
Volker Lendecke [Sat, 28 Feb 2004 18:41:16 +0000 (18:41 +0000)]
Add 'net rpc group [add|del]mem' for domain groups and aliases.
Volker
Volker Lendecke [Sat, 28 Feb 2004 08:18:09 +0000 (08:18 +0000)]
Fix my fix to net rpc group list. We can certainly have more than a single
set of groups.
Volker
Jeremy Allison [Sat, 28 Feb 2004 01:53:30 +0000 (01:53 +0000)]
Can't set allocation size on directories, return correct error code on
fail if file exists and target is a directory. gentest.
Jeremy.
Jeremy Allison [Sat, 28 Feb 2004 00:56:42 +0000 (00:56 +0000)]
More gentest fixes. Fix up regression in IS_NAME_VALID and renames.
Jeremy.
Rafal Szczesniak [Fri, 27 Feb 2004 22:15:38 +0000 (22:15 +0000)]
Added copyrights I forgot about looong ago...
rafal
Tim Potter [Thu, 26 Feb 2004 23:04:11 +0000 (23:04 +0000)]
Fix for writable printerdata problem - bugzilla #1112.
Volker Lendecke [Thu, 26 Feb 2004 14:34:44 +0000 (14:34 +0000)]
That const was one too many
Volker Lendecke [Thu, 26 Feb 2004 11:29:56 +0000 (11:29 +0000)]
Implement 'net groupmap set' and 'net groupmap cleanup'.
I was rather annoyed by the net groupmap syntax, I could never get it
right.
net groupmap set "domain admins" domadm
creates a mapping,
net groupmap set "domain admins" -C "Comment" -N "newntname"
should also do what you expect. I'd like to have some feedback on the usability
of this.
net groupmap cleanup
solves a problem I've had two times now: Our SID changed, and a user's primary
group was mapped to a SID that is not ours. net groupmap cleanup removes all
mappings that are not from our domain sid.
Volker
Volker Lendecke [Thu, 26 Feb 2004 11:07:06 +0000 (11:07 +0000)]
And another little const
Volker Lendecke [Thu, 26 Feb 2004 10:55:43 +0000 (10:55 +0000)]
Apply some const
Volker
Steve French [Thu, 26 Feb 2004 06:42:51 +0000 (06:42 +0000)]
Fixes to minor security bug pointed out by AB in the mount helper
Andrew Tridgell [Thu, 26 Feb 2004 02:11:31 +0000 (02:11 +0000)]
fixed compilation with --enable-dmalloc
the macro redefinition of free() means we cannot have a structure
element called "free"
Jeremy Allison [Thu, 26 Feb 2004 01:33:35 +0000 (01:33 +0000)]
Merging Richard's rename test.
Jeremy.
Jeremy Allison [Thu, 26 Feb 2004 01:31:10 +0000 (01:31 +0000)]
Interesting fact found by IFSTEST /t LockOverlappedTest...
Even if it's our own lock context, we need to wait here as
there may be an unlock on the way.
So I removed a "&& !my_lock_ctx" from the following
if statement.
if ((lock_timeout != 0) && lp_blocking_locks(SNUM(conn)) && ERROR_WAS_LOCK_DENIED(status)) {
Jeremy.
Andrew Bartlett [Wed, 25 Feb 2004 23:12:29 +0000 (23:12 +0000)]
Fix bug in previous global_sam_sid() commit. I broke the 'read from
MACHINE.SID' file functionality.
Also, before we print out the results of 'net getlocalsid' and 'net
getdomainsid', ensure we have tried to read that file, or have
generated one.
Andrew Bartlett
Andrew Bartlett [Wed, 25 Feb 2004 22:01:02 +0000 (22:01 +0000)]
I *hate* global variables...
OK, what was happening here was that we would invalidate global_sam_sid
when we set the sid into secrets.tdb, to force a re-read.
The problem was, we would do *two* writes into the TDB, and the second one
(in the PDC/BDC case) would be of a NULL pointer. This caused smbd startups
to fail, on a blank TDB.
By using a local variable in the pdb_generate_sam_sid() code, we avoid this
particular trap.
I've also added better debugging for the case where this all matters, which
is particularly for LDAP, where it finds out a domain SID from the sambaDomain
object.
Andrew Bartlett
Jeremy Allison [Wed, 25 Feb 2004 21:37:22 +0000 (21:37 +0000)]
Fixup strange rename error case (gentest).
Jeremy.
Jim McDonough [Wed, 25 Feb 2004 20:02:47 +0000 (20:02 +0000)]
Do the query part of the previous fix...reset time and duration are set in minutes, not seconds. Works from usrmgr.
Jim McDonough [Wed, 25 Feb 2004 15:02:55 +0000 (15:02 +0000)]
reset time and duration are set in minutes, not seconds. Works from usrmgr.
Jeremy Allison [Wed, 25 Feb 2004 02:15:34 +0000 (02:15 +0000)]
Figured out a new flags bit with gentest and ethereal....
Jeremy.
Jeremy Allison [Wed, 25 Feb 2004 01:35:14 +0000 (01:35 +0000)]
More gentest fun :-). NB. I'm not fixing OpenX breakage 'cos if you look
at what W2K3 accepts here it's COMPLETELY BROKEN ! :-).
Jeremy.
Jeremy Allison [Wed, 25 Feb 2004 00:48:35 +0000 (00:48 +0000)]
More gentest fixes.
Jeremy.
Volker Lendecke [Tue, 24 Feb 2004 18:00:41 +0000 (18:00 +0000)]
Add 'net rpc group add'. For this parse_samr.c had to be changed: The
group_info4 in set_dom_group_info also has the level in the record
itself. This seems not to be an align. Tested with NT4 usrmgr.exe. It can
still create a domain group on a samba machine.
Volker
Volker Lendecke [Tue, 24 Feb 2004 17:28:17 +0000 (17:28 +0000)]
Remove unused variable.
Volker
Volker Lendecke [Tue, 24 Feb 2004 15:45:10 +0000 (15:45 +0000)]
'net idmap restore' is too useful to be left broken :-)
Set the HWM values correctly after having manipulated the tdb.
Volker
Jeremy Allison [Tue, 24 Feb 2004 01:46:24 +0000 (01:46 +0000)]
Ensure '.' and '..' don't match in delete requests.
Jeremy.
Jeremy Allison [Tue, 24 Feb 2004 00:55:05 +0000 (00:55 +0000)]
More gentest error fixups.
Jeremy.
Jeremy Allison [Tue, 24 Feb 2004 00:38:39 +0000 (00:38 +0000)]
Fixup bad-path error found by gentest.
Jeremy.
Jeremy Allison [Tue, 24 Feb 2004 00:06:08 +0000 (00:06 +0000)]
Added NTrename SMB (0xA5) - how did we miss this.... ?
Jeremy.
Jeremy Allison [Tue, 24 Feb 2004 00:03:18 +0000 (00:03 +0000)]
Fixup correct timeout values for blocking lock timeouts (tested at connectathon
by Herb).
Jeremy.
Andrew Bartlett [Mon, 23 Feb 2004 21:09:09 +0000 (21:09 +0000)]
Found by Fabien Chevalier <fabien.chevalier@supelec.fr> and
JustFillBug <mozbugbox@yahoo.com.au> on the Samba lists - a 'max
password age' of zero should be considered as 'never expire'.
For the timebeing we just set it like -1, but we might revisit this
for closer-to-ms behaviour.
Andrew Bartlett
Jeremy Allison [Mon, 23 Feb 2004 20:12:31 +0000 (20:12 +0000)]
Fix "unable to initialize" bug when smbd hasn't been run with
new system and a user is being added via pdbedit/smbpasswd.
Found at Connectathon setup.
Jeremy.
Jim McDonough [Mon, 23 Feb 2004 02:54:03 +0000 (02:54 +0000)]
Janitor for tpot...bugzilla #1098, msleep already exists on aix
Jim McDonough [Mon, 23 Feb 2004 02:47:33 +0000 (02:47 +0000)]
Add bad password count/time attributes
Jim McDonough [Sun, 22 Feb 2004 20:25:43 +0000 (20:25 +0000)]
Add bad password count/time attributes
Jim McDonough [Sat, 21 Feb 2004 17:41:28 +0000 (17:41 +0000)]
Add calls to password lockout functions. Should now work against tdbsam only.
Tim Potter [Sat, 21 Feb 2004 00:28:48 +0000 (00:28 +0000)]
printf -> d_printf
Bugzilla #1066.
Jeremy Allison [Fri, 20 Feb 2004 23:19:39 +0000 (23:19 +0000)]
Make SMB_FILE_ACCESS_INFORMATION call work correctly.
Jeremy.
Jeremy Allison [Fri, 20 Feb 2004 22:45:53 +0000 (22:45 +0000)]
Make us bug-for-bug compatible with W2K3 - to get delete on close semantics
on an initial open the desired_access field *must* contain DELETE_ACCESS,
simply having it map from a GENERIC_ALL won't do. Fixes delete on close test.
Jeremy.
Jim McDonough [Fri, 20 Feb 2004 16:00:25 +0000 (16:00 +0000)]
handle both 0 and -1 as disabling reset count and lockout duration
Jim McDonough [Fri, 20 Feb 2004 15:59:05 +0000 (15:59 +0000)]
Make default lockout duration and reset count time 30 minutes, to match windows, and also be valid (0 was invalid)
Gerald Carter [Fri, 20 Feb 2004 15:52:14 +0000 (15:52 +0000)]
just say no to crack
Gerald Carter [Fri, 20 Feb 2004 15:50:18 +0000 (15:50 +0000)]
<attr/xattr.h> & <sys/xattr.h> are mutually exclusive it seems; fix build on SuSE 8.2
Jeremy Allison [Thu, 19 Feb 2004 23:00:01 +0000 (23:00 +0000)]
Fixup correct (as per W2K3) returns for lookupsids as well as lookupnames.
Inspired by Volkers patch.
Jeremy.
Gerald Carter [Thu, 19 Feb 2004 22:17:54 +0000 (22:17 +0000)]
sys/xattr.h merge from HEAD
Jim McDonough [Thu, 19 Feb 2004 21:40:22 +0000 (21:40 +0000)]
Enable checking/resetting of account lockout and bad password based on policy
Jim McDonough [Thu, 19 Feb 2004 21:37:24 +0000 (21:37 +0000)]
Clean up bad pw count and autolock flag update fn()s
Jim McDonough [Thu, 19 Feb 2004 18:35:43 +0000 (18:35 +0000)]
Add bad pw count and autolock flag update fn()s
Gerald Carter [Thu, 19 Feb 2004 17:01:06 +0000 (17:01 +0000)]
merging some fixes from the release branch; more to come later
Jim McDonough [Thu, 19 Feb 2004 16:00:29 +0000 (16:00 +0000)]
Add bad password reset and display of bad password count/time
Jim McDonough [Thu, 19 Feb 2004 15:59:35 +0000 (15:59 +0000)]
Add functions to get/set bad password time
Jim McDonough [Thu, 19 Feb 2004 15:57:53 +0000 (15:57 +0000)]
Add bad password time fields
Jeremy Allison [Thu, 19 Feb 2004 01:55:24 +0000 (01:55 +0000)]
Fix the "too many fcntl locks" scalability problem raised by tridge.
I've now tested this in daemon mode and also on xinetd and I'm pretty
sure it's working.
Jeremy.
Steve French [Tue, 17 Feb 2004 22:51:42 +0000 (22:51 +0000)]
Fix incorrect strnicmp len
Jeremy Allison [Tue, 17 Feb 2004 22:46:25 +0000 (22:46 +0000)]
Fix based on Volker's code to correctly return code from lsa_lookup_sids
on unmapped sids.
Jeremy.
Steve French [Tue, 17 Feb 2004 21:31:25 +0000 (21:31 +0000)]
Disable dev (MS_NODEV) on user mounts from cifs vfs