cvs2svn Import User [Tue, 2 May 2000 23:00:39 +0000 (23:00 +0000)]
This commit was manufactured by cvs2svn to create tag
'release-alpha-2-5-3'.
Luke Leighton [Tue, 2 May 2000 23:00:38 +0000 (23:00 +0000)]
oops.
Jeremy Allison [Tue, 2 May 2000 21:07:26 +0000 (21:07 +0000)]
Implemented the last (I hope:-) part of the locking puzzle, the reference
counting when Windows downgrades a write lock to a read lock, then reference
counts the unlocks to match the locks.
With this code the POSIX unlock isn't done until the final Windows unlock.
Jeremy.
Elrond [Tue, 2 May 2000 18:17:06 +0000 (18:17 +0000)]
small merge from HEAD
Elrond [Tue, 2 May 2000 17:06:36 +0000 (17:06 +0000)]
- moved sam readline completion functions from cmd_interp.c
into samedit_cmds.c
- made a bunch of functions static
- more indent on parts of files
Elrond [Tue, 2 May 2000 16:45:45 +0000 (16:45 +0000)]
- Wrote lsa_io_q_set_info-parser
- used in api_lsa_set_info (now we can see, what they want
to set)
I still need LSA_R_SET_INFO
- run indent on parts of some files
- memcpy(pol, &r_x.pol, sizeof()) -> *pol = &r_x.pol
- Made some debug-messages in util_hnd nicer.
Elrond [Tue, 2 May 2000 16:25:53 +0000 (16:25 +0000)]
merge:
get_myname(x, NULL) -> get_myname(x)
Elrond [Tue, 2 May 2000 16:03:17 +0000 (16:03 +0000)]
- All share-info-parsers now can handle arrays of them
- Now all parsers for level 502 take a SHARE_INFO_502 as
parameter.
(Now we're close to the rewrite of the enum-code)
Luke Leighton [Tue, 2 May 2000 13:07:15 +0000 (13:07 +0000)]
authentication-fix (similar to in ntlmssp).
Luke Leighton [Tue, 2 May 2000 12:59:07 +0000 (12:59 +0000)]
upper-case KOI8-R make codepages.
Samba Release Account [Tue, 2 May 2000 11:23:04 +0000 (11:23 +0000)]
preparing for release of alpha.2.5.2
Luke Leighton [Tue, 2 May 2000 11:08:12 +0000 (11:08 +0000)]
OLE!! password changing is back again, client and server.
[anonymous netlogons were broken, and *encrypted* anonymous samr
connections were broken!]
Luke Leighton [Tue, 2 May 2000 10:33:19 +0000 (10:33 +0000)]
weird bug in client net sam logon, i have *no* idea how it actually
ever worked...
Luke Leighton [Tue, 2 May 2000 10:26:03 +0000 (10:26 +0000)]
trying to get anonymous access working properly in netlogond,
so that user-password-changing works.
[urr... connection? hellooo? it's a long story...]
Luke Leighton [Tue, 2 May 2000 09:20:44 +0000 (09:20 +0000)]
can't get a commit right.
Luke Leighton [Tue, 2 May 2000 09:18:52 +0000 (09:18 +0000)]
you know, _one_ of these days, we'll get a simple little stupid function
called samr_query_dom_pwinfo right. the number of parameters i think
the response contains has varied between two and three, with the phases
of the moon. i mean, you expect lsa_lookup_names() to take several weeks
over a period of months to get right, because it is a total beast [last
changes to lsa_lookup_names: two weeks ago, by elrond. first changes:
two years ago].
but _this_....
Luke Leighton [Tue, 2 May 2000 07:45:02 +0000 (07:45 +0000)]
added info level 3 (client-side) to spoolgetprinter command (again, thx jf)
Luke Leighton [Tue, 2 May 2000 07:04:30 +0000 (07:04 +0000)]
merge dfs.
jf's rpcclient test-commands (thanks jf!)
Luke Leighton [Tue, 2 May 2000 06:09:10 +0000 (06:09 +0000)]
took out SMB_ASSERTS.
Tim Potter [Tue, 2 May 2000 05:46:41 +0000 (05:46 +0000)]
make proto
Tim Potter [Tue, 2 May 2000 05:45:49 +0000 (05:45 +0000)]
Implementation of user and group enumeration caching. Cached data is
stored per-domain in a tdb database in the locks directory.
Tim Potter [Tue, 2 May 2000 05:39:27 +0000 (05:39 +0000)]
Added 'windind cache time' parameter to hold number of seconds cached
enumerated user and group information is kept. Default is 15 seconds.
Tim Potter [Tue, 2 May 2000 05:35:43 +0000 (05:35 +0000)]
Added nsswitch/winbindd_cache.o to winbindd objects.
Tim Potter [Tue, 2 May 2000 05:35:12 +0000 (05:35 +0000)]
Added user and group enumeration caching.
Tim Potter [Tue, 2 May 2000 05:34:47 +0000 (05:34 +0000)]
Added user and group enumeration caching.
Fixed silly cut&paste error.
Call free_*_array() functions instead of doing it all by hand.
Tim Potter [Tue, 2 May 2000 05:32:51 +0000 (05:32 +0000)]
Made some internal function static.
Initialise cache system on startup.
Flush user and group enumeration cache on SIGHUP.
Luke Leighton [Tue, 2 May 2000 05:13:25 +0000 (05:13 +0000)]
fun and games.
Luke Leighton [Tue, 2 May 2000 04:59:52 +0000 (04:59 +0000)]
more merge.
Luke Leighton [Tue, 2 May 2000 04:57:13 +0000 (04:57 +0000)]
removed hashed_getpwnam.
Luke Leighton [Tue, 2 May 2000 04:55:39 +0000 (04:55 +0000)]
tdb update.
Luke Leighton [Tue, 2 May 2000 04:53:50 +0000 (04:53 +0000)]
put lib/util_wunistr.c back in.
Luke Leighton [Tue, 2 May 2000 04:50:06 +0000 (04:50 +0000)]
merge fun.
Tim Potter [Tue, 2 May 2000 00:58:23 +0000 (00:58 +0000)]
Merge of tdb changes from HEAD by tridge:
- added TDB_INTERNAL, TDB_NOLOCK and TDB_NOMMAP flags.
- TDB_INTERNAL replaces the old method of passing a null filename
Jeremy Allison [Mon, 1 May 2000 19:44:02 +0000 (19:44 +0000)]
locking/posix.c: Fixed double-free nasty crash bug found by insure.
utils/make_smbcodepage.c:
utils/make_unicodemap.c: Insure 'make install' fixes.
Jeremy.
Shirish Kalele [Mon, 1 May 2000 18:00:31 +0000 (18:00 +0000)]
Added info level 1005 in netsharegetinfo to TNG.
If global "host msdfs" in smb.conf is set to true, set_default_server_announce_type() to include SV_TYPE_DFS_SERVER.
Luke Leighton [Mon, 1 May 2000 12:58:23 +0000 (12:58 +0000)]
david flynn found test-case where SMB_ASSERT looked like it was being
called unnecessarily.
Tim Potter [Mon, 1 May 2000 08:57:50 +0000 (08:57 +0000)]
Broke out some per-domain state into per-server (i.e singleton) state. All
lookup of names and sids is now done in a pass-through manner via the
workgroup PDC. Unfortunately, user and group enumeration still needs to be
done using per-domain state as there appears to be no way to perform the
enumeration without resorting to the SAMR pipe.
Sids for trusted domains are now looked up using the lsa_enum_trust_dom_info()
function instead of by contacting each PDC individually.
Cleaned up debugs.
When looking up names, the domain and name part needs to be separated by a
backslash rather than a forward slash.
Removed winbindd_lookup_aliasinfo() function as it is not used.
Removed find_domain_sid_from_name() function as it is now the same as
find_domain_from_name() function.
Added function to turn winbind command enums into strings.
Tim Potter [Mon, 1 May 2000 08:48:15 +0000 (08:48 +0000)]
Removed timeout and retry stuff - way too annoying.
Tim Potter [Mon, 1 May 2000 04:11:33 +0000 (04:11 +0000)]
Fix from insure. Name passed to winbindd_lookup_sid_by_name() and
lookup_domain_sid() isn't always an fstring.
Luke Leighton [Mon, 1 May 2000 03:02:50 +0000 (03:02 +0000)]
interesting bug found by tim, if you had two concetions to
different servers with the same pipe name, and you disconnected one,
there was no means to distinguish between them in ncacn_np_use_del,
so it deleted the wrong one.
oops!
well spotted, tim.
Tim Potter [Mon, 1 May 2000 01:36:40 +0000 (01:36 +0000)]
make proto for 'template homedir' and 'template shell' parameters as well
as some of lkcl's stuff.
Tim Potter [Mon, 1 May 2000 01:28:17 +0000 (01:28 +0000)]
Only enumerate groups in WINBINDD_DOMAIN environment variable, if set.
Fixed bug in resolving members of domain groups from a BUILTIN group.
Remove duplicates from group membership list.
Removed naughty calls to strtok() function.
Tim Potter [Mon, 1 May 2000 01:26:18 +0000 (01:26 +0000)]
Use 'template homedir' and 'template shell' parameters when filling in a
struct password.
Only enumerate users in WINBINDD_DOMAIN environment variable, if set.
Tim Potter [Mon, 1 May 2000 01:24:28 +0000 (01:24 +0000)]
Removed naughty calls to strtok() function.
Added some sanity checking of 'winbind uid' and 'winbind gid' id ranges.
Tim Potter [Mon, 1 May 2000 01:23:25 +0000 (01:23 +0000)]
Added 'template homedir' and 'template shell' parameters for users
allocated by winbind daemon.
Samba Release Account [Mon, 1 May 2000 00:44:52 +0000 (00:44 +0000)]
preparing for release of alpha.2.5.1
Luke Leighton [Sun, 30 Apr 2000 22:37:03 +0000 (22:37 +0000)]
more merge, and gratuitous merge.
Luke Leighton [Sun, 30 Apr 2000 14:52:42 +0000 (14:52 +0000)]
merge.
cvs2svn Import User [Sun, 30 Apr 2000 11:25:10 +0000 (11:25 +0000)]
This commit was manufactured by cvs2svn to create branch 'SAMBA_TNG'.
Andrew Tridgell [Sun, 30 Apr 2000 11:25:09 +0000 (11:25 +0000)]
some cleanups
Andrew Tridgell [Sun, 30 Apr 2000 11:15:27 +0000 (11:15 +0000)]
we don't need fnmatch.c any more
Andrew Tridgell [Sun, 30 Apr 2000 11:11:19 +0000 (11:11 +0000)]
changed masktest to test the internal algorithm against one server,
rather than 2 servers
Andrew Tridgell [Sun, 30 Apr 2000 11:04:28 +0000 (11:04 +0000)]
- removed all our old wildcard matching code and replaced it with a
call to ms_fnmatch(). This also removes all the Win9X semantics stuff
and a bunch of other associated cruft.
- moved the stat cache code into statcache.c
- fixed the uint16 alignment requirements of ascii_to_unistr() and
unistr_to_ascii()
- trans2 SMB_FIND_FILE_BOTH_DIRECTORY_INFO returns the short name as
unicode always (at least thats what NT4 does)
- fixed some errors in the in-memory tdb code. Still ugly, but doesn't
crash as much
Andrew Tridgell [Sun, 30 Apr 2000 04:45:16 +0000 (04:45 +0000)]
YIPEE!!!!!
We finally have a perfect emulation of Microsoft wildcard
matching. The routine ms_fnmatch() does wildcard matching with all MS
wildcards (including the unicode wildcards), and masktest against a
NT4 workstation with hundreds of thousands of random exmaples has not
found a single error.
amazingly it is only about 60 lines of code, but it has taken us years
to get it right. I didn't sleep much last night :)
Elrond [Sat, 29 Apr 2000 11:23:31 +0000 (11:23 +0000)]
tdb update from HEAD
cvs2svn Import User [Sat, 29 Apr 2000 04:05:39 +0000 (04:05 +0000)]
This commit was manufactured by cvs2svn to create branch 'SAMBA_TNG'.
Andrew Tridgell [Sat, 29 Apr 2000 04:05:38 +0000 (04:05 +0000)]
put tdb utility functions in a separate file
Jeremy Allison [Sat, 29 Apr 2000 01:09:31 +0000 (01:09 +0000)]
Removed tdb locking calls (picky Andrew...:-)
Jeremy Allison [Fri, 28 Apr 2000 21:18:42 +0000 (21:18 +0000)]
Forgot to add new file...
Jeremy.
Jeremy Allison [Fri, 28 Apr 2000 21:10:43 +0000 (21:10 +0000)]
Port of new POSIX locking functionality from HEAD to TNG.
Also vfs de-init change.
Jeremy.
Jeremy Allison [Fri, 28 Apr 2000 21:09:26 +0000 (21:09 +0000)]
Moved deletion of vfs handle into smbd/conn.c as it was being done too
soon in smbd/service.c (file operations were being done after the
handle was closed).
It looks cleaner in smbd/conn.c as it is part of the closing of a conn
struct anyway.
Jeremy.
cvs2svn Import User [Fri, 28 Apr 2000 20:54:24 +0000 (20:54 +0000)]
This commit was manufactured by cvs2svn to create branch 'SAMBA_TNG'.
Jeremy Allison [Fri, 28 Apr 2000 20:54:23 +0000 (20:54 +0000)]
Ok - this is the *third* implementation of this (third time's the charm :-).
This implementation keeps all POSIX lock records in a separate in memory
tdb database only known about in locking/posix.c. In addition, the pending
close fd's are also held in a tdb which has an array of fd's indexed by
device and inode.
The walk-split code uglyness has been moved to posix.c from brlock.c,
which is the only place that needs to know about it, and the extra
functions hacked into brlock to expose internal state have been removed.
This implementation passes smbtorture locktest4, the only thing I need
to check now for completeness is what to do about lock upgrade/downgrades
which Win32 allows under some *very* strange circumstances.
Jeremy.
Jeremy Allison [Fri, 28 Apr 2000 19:38:38 +0000 (19:38 +0000)]
Split off of POSIX locking into separate unit as Andrew requested.
Done so I don't lose my edits... :-).
Jeremy.
Shirish Kalele [Fri, 28 Apr 2000 18:36:47 +0000 (18:36 +0000)]
Added info level 1005 to netsharegetinfo (is the share a DFS root)
Added dfs_server announcement in set_default_server_announce_type()
Luke Leighton [Fri, 28 Apr 2000 08:45:46 +0000 (08:45 +0000)]
oh, dear, two commits-in-one.
1) spoolss code, wrote spoolss_getprinterdata then discovered i need
getprinter not data. argh!
2) returning uint32 results from cmd_* now, now void. fixup all sam
commands because that's the one where it's needed.
now, samedit -S \\server -U% -l log -c 'enumusers -u' will work, and
if it fails, samedit returns an exit status.
i want to abstract cli_error() so that i can parse NT_STATUSxxxxx into
a unix error code. cli_error() currently *has* to receive a cli_state
which is, like... bogus, in msrpc code.
Tim Potter [Fri, 28 Apr 2000 07:54:15 +0000 (07:54 +0000)]
Removed some debug messages.
Tim Potter [Fri, 28 Apr 2000 07:53:31 +0000 (07:53 +0000)]
Added constant for WINBINDD_DOMAIN environment variable.
Added domain parameter in winbindd_request data union.
Tim Potter [Fri, 28 Apr 2000 07:52:24 +0000 (07:52 +0000)]
#include stdlib.h for getenv()
Tim Potter [Fri, 28 Apr 2000 07:51:59 +0000 (07:51 +0000)]
Modified timeout parameters slightly. Still not happy with ntdom behaviour
when winbind daemon dies.
Pass contents of environment variable WINBINDD_DOMAIN to winbindd daemon
with each of {set,get,end}{pw,gr}ent() calls.
Removed pwent_ndx and grent_ndx statics for the moment - need to think
about how to implement server-side reuse of these in order to get clients
restarting from the correct point after when a get{pw,gr}ent() call has
been interrupted.
Tim Potter [Fri, 28 Apr 2000 07:48:21 +0000 (07:48 +0000)]
Remove code that rejected reuse = True for ncacn_np_use_add(). The correct
action is to create a new connection.
Tim Potter [Fri, 28 Apr 2000 07:44:56 +0000 (07:44 +0000)]
Set reuse to True in cli_connection_init_auth()
Jeremy Allison [Fri, 28 Apr 2000 02:06:19 +0000 (02:06 +0000)]
Added tdb_get/set_int_byblob, which takes a size_t len and then implemented
the tdb_get/set_int string functions in terms of them. Will be useful in storing
POSIX pending close records (which are ints but indexed by dev/inode pairs).
Jeremy.
Jeremy Allison [Fri, 28 Apr 2000 01:08:32 +0000 (01:08 +0000)]
Forgot to close when "posix locking" is set to False.
Jeremy.
Jeremy Allison [Fri, 28 Apr 2000 01:01:07 +0000 (01:01 +0000)]
Added optimization where we are single opener (don't free POSIX locks).
Jeremy.
Jeremy Allison [Fri, 28 Apr 2000 00:39:23 +0000 (00:39 +0000)]
Made changes suggested by Andrew review.
fd_close now calls fd_close_posix() directly.
set_posix_lock/release_posix_lock() now handle the reference counting.
More changes due when this gets moved to the file locking/posix.c
Jeremy.
Jeremy Allison [Thu, 27 Apr 2000 23:28:56 +0000 (23:28 +0000)]
Ok - this is more subtle than it looks :-).
When a file is being closed, once it passes the fnum and tid tests then
the locking context should be ignored when removing all locks. This is
what is done in the brl close case, but when you have outstanding
POSIX locks, then you cannot remove all the brl locks in one go, you
have to get the lock list and call do_unlock individually. As this
uses global_smbpid as the locking context, you need to make sure
that this is set correctly for the specific lock being removed. I
now do this by storing the smbpid in each entry in the unlock list returned from
the query call. I removed the smbpid from fsp (not needed) and
things seem ok (even with the stupid smbpid tricks that smbtorture plays :-).
Jeremy.
Jeremy Allison [Thu, 27 Apr 2000 22:23:04 +0000 (22:23 +0000)]
Fixed subtle unlocking bug when a file is closed. We need to store the
smbpid used when a file was opened in the files_struct. Else we use
the wrong global_smbpid when we are closing the file and trying to
remove the brl locks - this causes the brl locks to be left when the
file is closed as the samba_context check fails.
Jeremy.
Jeremy Allison [Thu, 27 Apr 2000 21:12:33 +0000 (21:12 +0000)]
Did the rewrite Andrew wanted where all knowledge of POSIX locking is
removed from the smbd/open.c code.
We now use a dlink list of structures indexed by dev/inode to store
all pending fd's for close. This could be rewritten to use lib/hash.c
if this is discovered to be too slow in use.
Andrew, please take a look and let me know if this is what you
had in mind.
Jeremy.
Jeremy Allison [Thu, 27 Apr 2000 18:46:10 +0000 (18:46 +0000)]
Fixed crash bugs Andrew pointed out with LOCK4 smbtorture
test. Was miscounting posix locks, plus was not taking into account
the case where other_fsp == fsp in the 'move locks' case. DOH ! This
code will be re-written anyway :-).
Jeremy.
Jeremy Allison [Thu, 27 Apr 2000 17:15:49 +0000 (17:15 +0000)]
Fixed range check on writeX.
Jeremy.
Jeremy Allison [Thu, 27 Apr 2000 17:14:45 +0000 (17:14 +0000)]
Fixed range check on writeX.
Jeremy.
Jeremy Allison [Thu, 27 Apr 2000 17:05:35 +0000 (17:05 +0000)]
Tidyup of smbecho.
Elrond [Thu, 27 Apr 2000 17:02:52 +0000 (17:02 +0000)]
splitting clientgen.c like in HEAD, not yet complete, but
it still compiles.
finaly added "extern int DEBUGLEVEL;" to debug.h
Elrond [Thu, 27 Apr 2000 16:54:44 +0000 (16:54 +0000)]
cli_use_wait_keyboard(): Checking for NULL-pointers
Jeremy Allison [Thu, 27 Apr 2000 16:53:31 +0000 (16:53 +0000)]
Tidyup of smbecho.
Jeremy.
Elrond [Thu, 27 Apr 2000 13:50:06 +0000 (13:50 +0000)]
dropped in config.guess/config.sub from libtool-1.3.4,
cause libtool didn't any more build shared libraries on my
linux box.
Jeremy, I think, the main problem was, that you dropped in
only config.sub from HEAD, which was compatible with the
config.guess from TNG.
Tim Potter [Thu, 27 Apr 2000 08:37:46 +0000 (08:37 +0000)]
global_myworkgroup is a fstring, not a pstring
Tim Potter [Thu, 27 Apr 2000 07:58:11 +0000 (07:58 +0000)]
Create winbind daemon prototypes in a separate file in nsswitch directory.
Tim Potter [Thu, 27 Apr 2000 07:55:59 +0000 (07:55 +0000)]
make proto
Tim Potter [Thu, 27 Apr 2000 07:55:31 +0000 (07:55 +0000)]
Include winbindd.h instead of includes.h
Tim Potter [Thu, 27 Apr 2000 07:55:07 +0000 (07:55 +0000)]
Include only winbindd.h
Tim Potter [Thu, 27 Apr 2000 07:54:42 +0000 (07:54 +0000)]
Include only winbindd.h
Fixed memory leaks and dodgy free() calls found by insure.
Tim Potter [Thu, 27 Apr 2000 07:52:17 +0000 (07:52 +0000)]
Include only winbindd.h
Reinstated sigint signal handler.
Tim Potter [Thu, 27 Apr 2000 07:51:06 +0000 (07:51 +0000)]
Removed embarassing string function #undef hackery.
Changed license to LGPL from GPL so non-GPL applications can use it without
having to make their source code available.
Modifications to include the minimum amount of headers.
Tim Potter [Thu, 27 Apr 2000 07:47:15 +0000 (07:47 +0000)]
Let's all give a big hand to winbindd_proto.h which has made the big move
over from the include directory.
[FX: applause]
Tim Potter [Thu, 27 Apr 2000 07:46:13 +0000 (07:46 +0000)]
Types used by both nss ntdom library and winbind daemon. Used to live in
winbindd.h header file.
Tim Potter [Thu, 27 Apr 2000 07:46:11 +0000 (07:46 +0000)]
file winbindd_ntdom.h was initially added on branch SAMBA_TNG.
Tim Potter [Thu, 27 Apr 2000 07:45:32 +0000 (07:45 +0000)]
config.h equivalent for nss ntdom library.
cvs2svn Import User [Thu, 27 Apr 2000 07:45:31 +0000 (07:45 +0000)]
This commit was manufactured by cvs2svn to create branch 'SAMBA_TNG'.