cvs2svn Import User [Fri, 12 Apr 2002 03:54:14 +0000 (03:54 +0000)]
This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.
Andrew Tridgell [Fri, 12 Apr 2002 03:54:13 +0000 (03:54 +0000)]
nicer measurement of failures and collisions
Andrew Tridgell [Fri, 12 Apr 2002 03:42:44 +0000 (03:42 +0000)]
better mangling test. We now test that we can create by long name and
delete by short name, and that we can create by short name and delete
by long name
our old mangling code fails this test.
also tweaked the random filename generation to produce more likely
collisions
Andrew Tridgell [Fri, 12 Apr 2002 03:26:19 +0000 (03:26 +0000)]
- added a mangling test suite that measures the collision rate on
randomised filenames
- fixed several mangling bugs that the test suite pointed out
Andrew Bartlett [Thu, 11 Apr 2002 23:43:40 +0000 (23:43 +0000)]
Much better support for both non-algorithic RIDs (where the RID is stored in
the passdb) and RIDs not in the passdb, due to being NIS users etc.
The main fix here is to add become_root()/unbecome_root() at critical places.
This (finally) fixes the bug where you could not see local users's names
in a file's security properties as non-root. Tested.
The similar bug in uid_to_sid is also fixed, but is not (yet) Tested.
Andrew Bartlett
Jeremy Allison [Thu, 11 Apr 2002 18:52:09 +0000 (18:52 +0000)]
HP2500C driver writes devmode with private data that ends
on a 2 byte boundary. We then miss-parse the desired_access. Also added
other fixes to ensure we align after private data (discussed with Gerry).
Jeremy.
Andrew Tridgell [Thu, 11 Apr 2002 15:27:22 +0000 (15:27 +0000)]
added strndup() for systems that don't have it
Andrew Tridgell [Thu, 11 Apr 2002 14:59:27 +0000 (14:59 +0000)]
don't try to return a void
Andrew Tridgell [Thu, 11 Apr 2002 14:30:31 +0000 (14:30 +0000)]
possibly fix the 15000 user problem
I think its caused by a rpc operation failing and us giving invalid
data back to the cache layer. Using talloc_zero() should solve this.
Andrew Tridgell [Thu, 11 Apr 2002 14:20:18 +0000 (14:20 +0000)]
- the 36^6 hash space gives 31 bits, not 32 bits. We need to mask the
hash to suit
- the prefix ends at the last dot, not the first
Andrew Tridgell [Thu, 11 Apr 2002 14:03:30 +0000 (14:03 +0000)]
a few debug statements (disabled)
Andrew Tridgell [Thu, 11 Apr 2002 13:35:28 +0000 (13:35 +0000)]
don't treat '.' as FLAG_ASCII, instead handle it separately
Andrew Tridgell [Thu, 11 Apr 2002 12:14:55 +0000 (12:14 +0000)]
- tidier flag checking code
- finished the is_mangled() function
Andrew Tridgell [Thu, 11 Apr 2002 11:46:42 +0000 (11:46 +0000)]
added some more comments
Andrew Tridgell [Thu, 11 Apr 2002 10:52:59 +0000 (10:52 +0000)]
some optimisations to the new mangling system
Andrew Tridgell [Thu, 11 Apr 2002 09:56:38 +0000 (09:56 +0000)]
this adds a completely new hash based mangling scheme
the hash for this scheme is *much* larger (approximately 31 bits) and
the code is written to be very fast, correctly handling multibyte
while not doing any actual multi-byte conversions in the vast majority
of cases
you can select this scheme using "mangling method = hash2", although I
may make it the default if it works out well.
Tim Potter [Thu, 11 Apr 2002 05:05:08 +0000 (05:05 +0000)]
Implemented a setup_logging() function that takes two keywords:
interactive and logfilename. These can be used to send Samba DEBUG()
output to stdout or to a logfile which makes automated testing much
funkier.
Also added get_debuglevel() and set_debuglevel() functions.
Make open_pipe_creds() accept None as a anonymous credential.
Tim Potter [Thu, 11 Apr 2002 05:04:05 +0000 (05:04 +0000)]
Implemented a setup_logging() function that takes two keywords:
interactive and logfilename. These can be used to send Samba DEBUG()
output to stdout or to a logfile which makes automated testing much
funkier.
Also added get_debuglevel() and set_debuglevel() functions.
Tim Potter [Thu, 11 Apr 2002 04:03:01 +0000 (04:03 +0000)]
Ignore bin directory.
Gerald Carter [Thu, 11 Apr 2002 03:15:02 +0000 (03:15 +0000)]
removed unnecessary memset
Jeremy Allison [Thu, 11 Apr 2002 02:59:31 +0000 (02:59 +0000)]
Correctly emulate NT in printer handle opening access rights.
Jeremy.
Andrew Tridgell [Thu, 11 Apr 2002 02:20:56 +0000 (02:20 +0000)]
This split the mangling code up to allow for the possibility of multiple
mangling implementation, selectable using "mangling method = " in smb.conf
It also tidies the interface a little, although it is still nasty.
Gerald Carter [Thu, 11 Apr 2002 02:13:56 +0000 (02:13 +0000)]
s/werror_str/dos_errstr/g to fix compile
Gerald Carter [Thu, 11 Apr 2002 02:08:36 +0000 (02:08 +0000)]
merge from 2.2
Gerald Carter [Thu, 11 Apr 2002 01:50:18 +0000 (01:50 +0000)]
WERROR merge from SAMBA_2_2
Gerald Carter [Thu, 11 Apr 2002 01:48:38 +0000 (01:48 +0000)]
specversion merge from SAMBA_2_2
Tim Potter [Thu, 11 Apr 2002 01:35:53 +0000 (01:35 +0000)]
Added a whole bunch more permission constants.
Jeremy Allison [Thu, 11 Apr 2002 00:42:38 +0000 (00:42 +0000)]
Removed duplicate _LARGEFILE64_SOURCE added in error.
Jeremy.
Jeremy Allison [Thu, 11 Apr 2002 00:37:31 +0000 (00:37 +0000)]
Ensure VFS modules will build correctly by adding defines for CPPFLAGS
defines into acconfig.h - only defined if seen.
Jeremy.
Jim McDonough [Wed, 10 Apr 2002 13:29:23 +0000 (13:29 +0000)]
Rename of ads_do_search_all2() to ads_do_search_all() and removal of
server sort controls. Also put option externs in the net.h include.
Jim McDonough [Wed, 10 Apr 2002 13:28:28 +0000 (13:28 +0000)]
Add a few option externs for net_ads.c
Jim McDonough [Wed, 10 Apr 2002 13:28:03 +0000 (13:28 +0000)]
A few more updates:
- Add doxygen comments
- remove server sort control (ms implementation was not reliable)
- rename ads_do_search_all2() to ads_do_search_all_fn()
Jim McDonough [Wed, 10 Apr 2002 13:25:40 +0000 (13:25 +0000)]
Add ads ldap server controls
Tim Potter [Wed, 10 Apr 2002 07:21:03 +0000 (07:21 +0000)]
Fixed missing alignment in spoolss_io_q_enumjobs() function.
Tim Potter [Wed, 10 Apr 2002 07:19:37 +0000 (07:19 +0000)]
Added cli_spoolss_enumjobs() function.
Jeremy Allison [Wed, 10 Apr 2002 01:04:13 +0000 (01:04 +0000)]
Added Shirish's client side caching policy change.
Jeremy.
Andrew Tridgell [Wed, 10 Apr 2002 00:36:06 +0000 (00:36 +0000)]
fixed a return value for a help function
Tim Potter [Wed, 10 Apr 2002 00:35:00 +0000 (00:35 +0000)]
Moved definition of winbind username/password secrets into secrets.h
Tim Potter [Tue, 9 Apr 2002 23:03:17 +0000 (23:03 +0000)]
When printing a tdb log message display "unnamed" instead of "unknown" if
the tdb has not been named.
Jeremy Allison [Tue, 9 Apr 2002 18:10:09 +0000 (18:10 +0000)]
Shirish pointed out more areas we should be doing roundups for allocation size.
Jeremy.
Tim Potter [Tue, 9 Apr 2002 06:19:42 +0000 (06:19 +0000)]
Fixed typo in debug statement.
Tim Potter [Tue, 9 Apr 2002 05:59:46 +0000 (05:59 +0000)]
Fixed some compiler warnings.
Tim Potter [Tue, 9 Apr 2002 05:11:34 +0000 (05:11 +0000)]
Added WERR_INVALID_FORM_NAME constant.
Andrew Bartlett [Tue, 9 Apr 2002 04:59:34 +0000 (04:59 +0000)]
Add a become_root()/unbecome_root() pair to allow acces to the passdb for
SID lookup. This fixes a bug where SIDs (rather than names) are displayed in windows ACL lists
Tim Potter [Tue, 9 Apr 2002 04:23:52 +0000 (04:23 +0000)]
Fixed setform and addform functions.
Tim Potter [Tue, 9 Apr 2002 04:22:27 +0000 (04:22 +0000)]
Added constants for form types and WERROR values.
Tim Potter [Tue, 9 Apr 2002 03:36:12 +0000 (03:36 +0000)]
The useless_ptr must be non-zero for addform and setform client functions
to work.
Note about setprinter level 1 not existing.
John Terpstra [Mon, 8 Apr 2002 20:10:08 +0000 (20:10 +0000)]
Fix location of binaries and make sure they get there. Still experimental.
Simo Sorce [Mon, 8 Apr 2002 09:29:28 +0000 (09:29 +0000)]
a fix yet committed to 2.2 sometimes ago and reintroduced here!
Andrew Bartlett [Mon, 8 Apr 2002 01:58:44 +0000 (01:58 +0000)]
Reintroduce the 2.2 name mangling code, until we get are more flexible solution.
Even for a hash/cache setup, this code needs some more work, in particular
it needs to use mangle_get_prefix() etc and to move to unicode internals.
Andrew Bartlett
Andrew Bartlett [Mon, 8 Apr 2002 01:52:44 +0000 (01:52 +0000)]
Fix up major logic reversal flaws in pdb_ldap.
WARNING: if you relied on these logic flaws, you will need to manually
edit your ldap backend (for things like account expries etc).
Now correctly retunes the information needed for 'must change at next login'
support.
Tim Potter [Sun, 7 Apr 2002 23:41:55 +0000 (23:41 +0000)]
Spelling.
John Terpstra [Sun, 7 Apr 2002 22:21:30 +0000 (22:21 +0000)]
Fix pathes.
Simo Sorce [Sun, 7 Apr 2002 22:04:39 +0000 (22:04 +0000)]
uint32 store and fectch functions, a signed int is not enough sometimes
Simo Sorce [Sun, 7 Apr 2002 22:02:09 +0000 (22:02 +0000)]
better check of called function's return
tdbtorture say it's ok
John Terpstra [Sun, 7 Apr 2002 21:20:32 +0000 (21:20 +0000)]
Oops .. last update was committed before saving! Argh!
John Terpstra [Sun, 7 Apr 2002 21:19:05 +0000 (21:19 +0000)]
Updated because I want this for now - NOTE: This will change before release
as this is NOT what we need to ship. This is experimental only at this time.
Jeremy Allison [Sat, 6 Apr 2002 01:25:57 +0000 (01:25 +0000)]
Always pass NT password as well as Lanman.
Jeremy.
Jeremy Allison [Fri, 5 Apr 2002 22:41:39 +0000 (22:41 +0000)]
Fix Gerry bug - MajorVersion should be 2 not 3.
Jeremy.
Jeremy Allison [Fri, 5 Apr 2002 22:37:55 +0000 (22:37 +0000)]
Fixed up admin user / guest user lookup.
Jeremy.
Jim McDonough [Fri, 5 Apr 2002 19:28:02 +0000 (19:28 +0000)]
Use the new ads_do_search_all2 function. It provides sorted results. We now
also filter out users that end in '$', which gives us the same results as
the net rpc user and net rap user.
Jim McDonough [Fri, 5 Apr 2002 19:26:52 +0000 (19:26 +0000)]
Several updates to get server side sorting going:
- Added sort control to ads_do_paged_search. It allows a char * to be passed
as the sort key. If NULL, no sort is done.
- fixed a bug in the processing of controls (loop wasn't incremented properly)
- Added ads_do_search_all2, which funs a function that is passed in against
each entry. No ldapmessage structures are returned. Allows results to
be processed as the come in on each page.
I'd like ads_do_search_all2 to replace ads_do_search_all, but there's some
work to be done in winbindd_ads.c first.
Also, perhaps now we can do async ldap searches? Allow us to process a
page while the server retrieves the next one?
Volker Lendecke [Fri, 5 Apr 2002 17:02:34 +0000 (17:02 +0000)]
Merge from 2.2
Tim Potter [Fri, 5 Apr 2002 05:56:44 +0000 (05:56 +0000)]
New version of patch.
Tim Potter [Fri, 5 Apr 2002 05:55:44 +0000 (05:55 +0000)]
make proto
Tim Potter [Fri, 5 Apr 2002 05:55:23 +0000 (05:55 +0000)]
Added new files for drivers, forms and ports conversion routines.
Tim Potter [Fri, 5 Apr 2002 05:52:20 +0000 (05:52 +0000)]
Fixed dodgy looking prototypes for py_to_* functions.
Tim Potter [Fri, 5 Apr 2002 05:49:33 +0000 (05:49 +0000)]
Removed unused label.
Tim Potter [Fri, 5 Apr 2002 05:48:01 +0000 (05:48 +0000)]
Converted drivers, forms and ports functions to use new conversion routines
and exception throwing.
Tim Potter [Fri, 5 Apr 2002 04:57:06 +0000 (04:57 +0000)]
Added py_spoolss_printers_conv.c to spoolss extension.
Tim Potter [Fri, 5 Apr 2002 04:55:26 +0000 (04:55 +0000)]
make proto
Tim Potter [Fri, 5 Apr 2002 04:54:48 +0000 (04:54 +0000)]
New routines to convert between structures and python dictionaries. We now
hide to_struct() and from_struct() from the caller so we can add custom
fields nicely.
Tim Potter [Fri, 5 Apr 2002 04:53:20 +0000 (04:53 +0000)]
Throw a spoolss.werror exception when the rpc client routines return
errors.
Move to new system of converting between structures and python
dictionaries. Lots of stuff moved to py_spoolss_printers_conv.c
Setprinter level 2 kind of works now.
Tim Potter [Fri, 5 Apr 2002 04:49:39 +0000 (04:49 +0000)]
Don't include py_spoolss_conv.h by default. We want to hide these
functions from method functions.
Tim Potter [Fri, 5 Apr 2002 04:47:43 +0000 (04:47 +0000)]
Added functions to return Python tuples (error code, error string)
corresponding to NT and DOS errors.
Jim McDonough [Fri, 5 Apr 2002 01:36:50 +0000 (01:36 +0000)]
add utils/net_help.c to bin/net build
Jim McDonough [Fri, 5 Apr 2002 01:36:28 +0000 (01:36 +0000)]
Lots more net consistency work:
- Added net_help.c for unified help when possible
- Added net rpc user listing, delete, info commands
- Unified net user command to autodetect ads/rpc/rap (try in that order)
- Added generic routine for detecting rpc (protocol > PROTOCOL_NT1)
- I'm sure I forgot something.
Tim Potter [Thu, 4 Apr 2002 22:58:56 +0000 (22:58 +0000)]
Make bin/nsstest as part of torture target.
Tim Potter [Thu, 4 Apr 2002 22:56:39 +0000 (22:56 +0000)]
Fixed some compile warnings.
Tim Potter [Thu, 4 Apr 2002 20:38:10 +0000 (20:38 +0000)]
More spelling.
Jim McDonough [Thu, 4 Apr 2002 16:53:07 +0000 (16:53 +0000)]
Multiple changes:
- Get rid of improper "Invalid option: d (100)" message when setting
debug from commandline.
- Eliminate got_pass global and only use opt_password. This enables
re-use of password that may have been enetered in failed ads connect.
- Auto-detect method for net user command
- use new net_ads_check rather than lp_security==ADS test on net join
- Get rid of annoying debug level 0's
Jim McDonough [Thu, 4 Apr 2002 16:48:23 +0000 (16:48 +0000)]
Cleanups to make auto-detection of method on net user smoother.
Jim McDonough [Thu, 4 Apr 2002 16:47:24 +0000 (16:47 +0000)]
More updates for auto-detecting server connection method. Added net_ads_check()
to make a connection (which stores the password in a global so it can be
used by rpc or rap function if ads fails) and close it to verify if ads
method should be used.
Jean-François Micouleau [Thu, 4 Apr 2002 15:50:28 +0000 (15:50 +0000)]
small change in name_resolve_bcast()
spotted by alexander bokovoy.
it shouldn't break anything. if it's wrong, feel free to revert but
explain why.
J.F.
Tim Potter [Thu, 4 Apr 2002 06:55:32 +0000 (06:55 +0000)]
If compiling with Insure, mallocate a byte of memory and attach it to the
POLICY_HND structure when passing new handles back from the appropriate
cli_* functions. When closing the policy handle free the memory.
Insure (and indeed other memory checkers) should detect handles that have
not been closed properly as memory leaks. Unfortunately this can only be
done when the program terminates (set insure++.summarize leaks in your
.psrc file) rather than when the policy handle falls out of scope.
Looks like Jeremy has squished all the policy handle leaks at the moment
but more are bound to crop up later.
Tim Potter [Thu, 4 Apr 2002 06:47:20 +0000 (06:47 +0000)]
Spelling.
Tim Potter [Thu, 4 Apr 2002 06:40:17 +0000 (06:40 +0000)]
Call poptFreeContext() as appropriate.
Clean up exit path code.
Tim Potter [Thu, 4 Apr 2002 06:11:22 +0000 (06:11 +0000)]
oops
Tim Potter [Thu, 4 Apr 2002 06:10:22 +0000 (06:10 +0000)]
Fixed memory leak in cli_lsa_enum_trust_dom(). Use talloc_strdup() instead
of strdup().
Tim Potter [Thu, 4 Apr 2002 05:48:27 +0000 (05:48 +0000)]
Rerun autoconf.
Tim Potter [Thu, 4 Apr 2002 05:47:41 +0000 (05:47 +0000)]
Use m4-mode when editinging configure.in under emacs.
Use $CC instead of $SHLD for the "test whether building a shared library
actually works". At the moment this is failing as $SHLD (and $LDSHFLAGS -
look at the value this is set to for Solaris) are designed to be used from
a Makefile and not within configure so this test will always fail!
Tridge has suggested moving to libtool^H^H^H^H^H a shell script that
invokes the right linker with the right args and solves this problem
nicely.
Tim Potter [Thu, 4 Apr 2002 04:54:44 +0000 (04:54 +0000)]
Also look for libinsure.so where the full version installs it.
Tim Potter [Thu, 4 Apr 2002 04:29:09 +0000 (04:29 +0000)]
Free popt context after argument parsing.
Tim Potter [Thu, 4 Apr 2002 03:53:43 +0000 (03:53 +0000)]
Fixed memory leak in make_pdb_context_name()
Some reformatting and spelling fixes.
Jim McDonough [Thu, 4 Apr 2002 03:14:25 +0000 (03:14 +0000)]
Add non-ads version of net_ads_help for build on non-ads machines.
Jim McDonough [Thu, 4 Apr 2002 03:06:22 +0000 (03:06 +0000)]
Correct error string function call to ads_errstr()
Jeremy Allison [Thu, 4 Apr 2002 03:03:39 +0000 (03:03 +0000)]
Fix up conversion code from old winbindd versions (some testing needed).
Added time based cache size check (#ifdef'ed out by default, just didn't
want to lose the code).
Jeremy.
Jim McDonough [Thu, 4 Apr 2002 03:03:00 +0000 (03:03 +0000)]
Try harder next time to not duplicate function...take ads_err2string back
out since it's already in ads_errstr() in ads_status.c
Jim McDonough [Thu, 4 Apr 2002 02:54:47 +0000 (02:54 +0000)]
Add ability to get specific net ads subcommand help. Not all have been
implemented yet...
Jim McDonough [Thu, 4 Apr 2002 02:53:42 +0000 (02:53 +0000)]
Add net ads user subcommands: add delete info. Also make user listing format
consistent with rap version.