Andrew Tridgell [Mon, 29 Jul 2002 11:14:05 +0000 (11:14 +0000)]
an initial fix for handling sparse files in smbd
This gets my test code working, where we previously failed with files
above 20G in size.
I'm still not completely happy with this. There are just too many
fields in trans2.c that we don't fill in.
Simo Sorce [Mon, 29 Jul 2002 09:44:29 +0000 (09:44 +0000)]
as suggested by Alexander Oswald <oswald@is.haw-hamburg.de>
hide only unwriteable files and not dirs with this one.
may be a hide unwriteable dirs param will follow.
Tim Potter [Mon, 29 Jul 2002 09:32:25 +0000 (09:32 +0000)]
Started to get samsync to insert account information in the passdb. It's
pretty half-arsed at the moment and doesn't work very well but Mr Bartlett
was interested in it.
Also started playing around with the more interesting bits of popt. The
auto-generated usage information is pretty neat.
Tim Potter [Mon, 29 Jul 2002 09:28:16 +0000 (09:28 +0000)]
Added extern for popt_common_debug.
Tim Potter [Mon, 29 Jul 2002 09:26:38 +0000 (09:26 +0000)]
Add lib/popt_common.o
Tim Potter [Mon, 29 Jul 2002 09:25:23 +0000 (09:25 +0000)]
Use common popt definition for -d option.
Tim Potter [Mon, 29 Jul 2002 09:23:01 +0000 (09:23 +0000)]
A place to store common popt routines.
Simo Sorce [Mon, 29 Jul 2002 07:57:48 +0000 (07:57 +0000)]
people should be happier now.
changed strtof with sscanf to make things working on all platforms.
changed auto-made bubble sort for more efficient and clean qsort()
Tim Potter [Mon, 29 Jul 2002 03:50:35 +0000 (03:50 +0000)]
Skeleton for a libsmb python wrapper.
Tim Potter [Mon, 29 Jul 2002 03:26:31 +0000 (03:26 +0000)]
Merge from APPLIANCE_HEAD:
>When creating an automatically generated prototype make sure the
>destination directory exists.
Tim Potter [Mon, 29 Jul 2002 03:07:49 +0000 (03:07 +0000)]
Updated patch.
Simo Sorce [Sun, 28 Jul 2002 18:10:39 +0000 (18:10 +0000)]
found nasty bug in intl/lang_tdb.c tdb structure was not tested to not be null before close
this one fixes swat not working with browsers that set more then one language.
along the way implemented language priority in web/neg_lang.c with bubble sort
also changet str_list_make to be able to use a different separator string
Simo.
Andrew Bartlett [Sun, 28 Jul 2002 08:14:17 +0000 (08:14 +0000)]
This patch does two things:
The first is to add sensible quotes to various default paramaters, and the
second is to ensure that we don't remove to many " characters from paramaters.
(Both from the debian patches to Samba).
Andrew Bartlett
Andrew Tridgell [Sun, 28 Jul 2002 08:04:31 +0000 (08:04 +0000)]
minor portability fix
samba-patches 820
Andrew Tridgell [Sun, 28 Jul 2002 07:53:14 +0000 (07:53 +0000)]
fix for smbtar filename matching
samba-patches 852
Andrew Tridgell [Sun, 28 Jul 2002 07:15:42 +0000 (07:15 +0000)]
this is an interim fix for nmbd not registering DOMAIN#1b with WINS
when a PDC. The fix does not iterate over all WINS tags, which it
should do, but after having looked at doing that it gets *very* messy
to do with our current code base.
Andrew Bartlett [Sun, 28 Jul 2002 06:43:03 +0000 (06:43 +0000)]
Add the ability to set account policies too.
Andrew Bartlett
Andrew Tridgell [Sun, 28 Jul 2002 06:26:41 +0000 (06:26 +0000)]
make sure async dns nmbd child dies
samba-patches 898
Andrew Tridgell [Sun, 28 Jul 2002 06:19:14 +0000 (06:19 +0000)]
fix minor nits in nmbd from adtam@cup.hp.com
samba-patches 959
Andrew Tridgell [Sun, 28 Jul 2002 06:08:30 +0000 (06:08 +0000)]
good security patch from Timothy.Sell@unisys.com
we could generate short passwords!
samba-patches 880
Andrew Tridgell [Sun, 28 Jul 2002 06:04:32 +0000 (06:04 +0000)]
partial apply of samba-patches 960
Andrew Tridgell [Sun, 28 Jul 2002 05:57:23 +0000 (05:57 +0000)]
fixed man install
samba-patches 961
Andrew Tridgell [Sun, 28 Jul 2002 05:50:57 +0000 (05:50 +0000)]
fixed logfile location to honor configure
samba-patches 966
Andrew Tridgell [Sun, 28 Jul 2002 05:45:48 +0000 (05:45 +0000)]
fixed typo
samba-patches 970
Andrew Bartlett [Sun, 28 Jul 2002 03:41:50 +0000 (03:41 +0000)]
Fix a missing 'no memory' return in last night's svrsvc code, and use
sys_dup2() in a couple more places.
Andrew Bartlett
Andrew Bartlett [Sun, 28 Jul 2002 02:36:16 +0000 (02:36 +0000)]
Warn about n^2 algorithm with utmp=yes.
Andrew Bartlett
Andrew Bartlett [Sun, 28 Jul 2002 02:23:22 +0000 (02:23 +0000)]
Another item off my long-term todo list:
Remove the n^2 search for valid 'tty' names from the sesion code when we
don't actually need it. Its main value is in getting 'well behaved'
numbers for use with utmp, so when we are not doing utmp we don't need
this to get in the way.
Andrew Bartlett
Andrew Bartlett [Sun, 28 Jul 2002 02:20:15 +0000 (02:20 +0000)]
It seems I didn't need to write a dup2() wrapper - as we already use it a
lot. But as thats done, we might as well use it anyway.
Andrew Bartlett
Andrew Bartlett [Sun, 28 Jul 2002 02:17:57 +0000 (02:17 +0000)]
Clean this code up a little. If it's alrady asprintf()ed, I see no
need for a manual strdup() too...
Andrew Bartlett [Sat, 27 Jul 2002 11:48:55 +0000 (11:48 +0000)]
A very long time ago (actually 6 months ago) I promised to commit this code
to the Samba tree.
Originally written by Nigel Williams" <nigel@veritas.com>, I've been
trying to keep it in some form of shape for the last 6 months. In particular
I think some of the code got committed a few months ago, and others have made
changes to the CVS version over time.
anyway, its finally in - and doesn't appear to have broken anything.
Now to try the client-side patches :-)
Andrew Bartlett
Andrew Bartlett [Sat, 27 Jul 2002 06:07:53 +0000 (06:07 +0000)]
Update the rebind code in pdb_ldap.
I've still not tested this, but I didn't test the last lot and I'm pretty
sure I stuffed it up - but at least this rebind procedure matches the
function prototype.
It should also be fine on OpenLDAP 2.1 if I'm lucky.
Andrew Bartlett
Andrew Bartlett [Sat, 27 Jul 2002 02:54:39 +0000 (02:54 +0000)]
This should fix a nastly little bug where if a user had already done one
session setup, it would not correctly pick up the [homes] share on a subsequent
session setup.
The new rules are: If you want to connect to [homes], then it must have been
available at session setup time, or you must be in security=share. At each
session setup, the user's copy of [homes] is updated to ensure it has the right
path etc.
Andrew Bartlett
Simo Sorce [Sat, 27 Jul 2002 02:33:49 +0000 (02:33 +0000)]
nice day today
add also hide unwriteable as per user request
Simo Sorce [Sat, 27 Jul 2002 01:37:33 +0000 (01:37 +0000)]
as per user request added windbind start/stop/restart in swat
almost working, seem it does not yet properly detect if windbind is running or not in all situations testing is welcome.
Andrew Bartlett [Sat, 27 Jul 2002 00:15:02 +0000 (00:15 +0000)]
Rafal 'Mimir' Szczesniak <mimir@diament.ists.pwr.wroc.pl> has been busy
again, and has added 'net rpc trustdom list' support.
This lists the trusted and trusting domains of a remote PDC.
I've applied these almost directly, just fixing some special
case code for when there are *no* trusting domains. We still
have some parse errors in this case however.
Andrew Bartlett.
From mimir's e-mail:
Here are another patches adding trust relationship features.
More details:
Better error reporting in cli_lsa_enum_trust_dom().
Implementation of cli_samr_enum_dom_users() which cli_samr.c
lacked.
More "consts" -- one of arguments in net_find_dc().
Modified implementation of run_rpc_command() -- now it
allows to reuse already opened connection (if it is passed)
to remote server's IPC$ (e.g. as part of longer exchange
of rpc calls). I'm sure Andrew will argue ;-)
More neat version of rpc_trustdom_list() function.
Gerald Carter [Fri, 26 Jul 2002 22:40:06 +0000 (22:40 +0000)]
3 things:
* normalize all registry key strings before storing or looking
up paths in the registry tdb
* return the current buffer size for REG_INFO even when not returning
actual data
* fix a segfault report by metze on #samba-technical so that the
user/group object picker works again (was the "ProductType" key
lookup that was failing).
Gerald Carter [Fri, 26 Jul 2002 21:49:56 +0000 (21:49 +0000)]
fix parameters for ldap_set_rebind_proc() from OpenLDAP 2.1
Andrew Bartlett [Fri, 26 Jul 2002 15:24:12 +0000 (15:24 +0000)]
(another patch from mimir)
Add some debugging info to the secrets code.
We might review what debug level that should be at, but it's fine for now.
Andrew Bartlett
Andrew Bartlett [Fri, 26 Jul 2002 13:05:29 +0000 (13:05 +0000)]
Mimir has been busy with patches again, and sent in the following
patches:
Andrew Bartlett
From his e-mail:
Below I attach the following patches as a result of my work
on trusted domains support:
1) srv_samr_nt.c.diff
This fixes a bug which caused to return null string as
the first entry of enumerated accounts list (no matter what
entry, it was always null string and rid) and possibly
spoiled further names, depeding on their length.
I found that while testing my 'net rpc trustdom list'
against nt servers and samba server.
2) libsmb.diff
Now, fallback to anonymous connection works correctly.
3) smbpasswd.c.diff
Just a little fix which actually allows one to create
a trusting domain account using smbpasswd
4) typos.diff
As the name suggests, it's just a few typos fix :)
Andrew Bartlett [Fri, 26 Jul 2002 10:25:08 +0000 (10:25 +0000)]
I think this makes the debug statement clearer.
(but assumes that 'myip' is indeed our local IP...)
Andrew Bartlett
Andrew Bartlett [Fri, 26 Jul 2002 07:18:15 +0000 (07:18 +0000)]
Clarify this comment.
Tim Potter [Fri, 26 Jul 2002 01:01:27 +0000 (01:01 +0000)]
Print out a friendly message on error instead of a python exception when
calling tdb.open()
Override Python's SIGINT handler so we can quit from the command line
by hitting Ctrl-C.
Andrew Tridgell [Thu, 25 Jul 2002 15:43:06 +0000 (15:43 +0000)]
I had forgotten to commit this after running configure
Gerald Carter [Wed, 24 Jul 2002 19:53:49 +0000 (19:53 +0000)]
* fix return code so we don't let a client just open any key it wants
(even nonexistent ones). This gets rid of the Scheduling Agent icon.
* fix NT_STATUS return code for bad registry path (NT_STATUS_NO_SUCH_FILE)
Gerald Carter [Wed, 24 Jul 2002 08:58:03 +0000 (08:58 +0000)]
done! printer_info_2, devicemode, sec_desc, & printer data all enumerate
and display correctly in regedit.exe.
Not sure about REG_SZ values in PrinterDriverData. If we store these
in UNICODE, I'll have to fix up a few things.
REG_BINARY & REG_DWORD are fine.
Andrew Tridgell [Wed, 24 Jul 2002 08:39:17 +0000 (08:39 +0000)]
reran configure
Gerald Carter [Wed, 24 Jul 2002 06:42:09 +0000 (06:42 +0000)]
several changes in this checkin
* added REG_OPEN_HKCR for supporting regedit.exe
* All data n a REGISTRY_VALUE is stored to a pointer now
* fixed REG_INFO to correctly display data when double clicking on
and entry in the registry editor
* Will now enumerate installed driver_info_3 data
* fixed numerous bugs related to pointer offsets, memory issues, etc..
in the registry routines
* added a simple caching mechanism to fetch_reg_[keys|values]_specific()
All that is left now is to enumerate PrinterData and I will have finished
what I started out to do....
Andrew Bartlett [Wed, 24 Jul 2002 05:51:44 +0000 (05:51 +0000)]
If lp_add_home() fails, don't go any further, just return -1.
Andrew Bartlett
Andrew Bartlett [Wed, 24 Jul 2002 05:26:32 +0000 (05:26 +0000)]
Make it possible to query account policy values from pdbedit (set to come soon).
Update account_pol.c to use just uint32, rather then uint32 for paramaters,
int32 for storage. (The int32 functions didn't have seperate return/status
values, uint32 functions use a pointer-paramater).
Move the #define -> string from a swtich to a table, so we can look it up
both ways.
Andrew Bartlett
Andrew Bartlett [Wed, 24 Jul 2002 05:04:18 +0000 (05:04 +0000)]
Actually check the return value of the account_policy_get() call.
Andrew Bartlett
Andrew Bartlett [Wed, 24 Jul 2002 05:01:49 +0000 (05:01 +0000)]
We must be root to access the passdb, so ensure all calls to local_lookup_sid()
have become_root()/unbecome_root() wrappers.
(this should be the last of them, the rest were done ages ago).
Andrew Bartlett
Andrew Bartlett [Wed, 24 Jul 2002 03:13:43 +0000 (03:13 +0000)]
Add another message rather than 'internal module error'
Andrew Bartlett
Andrew Bartlett [Wed, 24 Jul 2002 03:00:14 +0000 (03:00 +0000)]
Give an idea what service didn't have the directory.
Andrew Tridgell [Tue, 23 Jul 2002 09:22:29 +0000 (09:22 +0000)]
implemented getgrouplist() for systems that don't have it and use it
in get_alias_user_groups(). The old method used getgrent() which is
extremely slow when the number of groups is large
Gerald Carter [Tue, 23 Jul 2002 05:07:40 +0000 (05:07 +0000)]
* fix to display correct form information in REG_BINARY information
This should be 8 x uint32 (not 7. I'm guessing the 2nd to the last
uint32 is the index number for the form? Not that big a deal
I don't think.
Gerald Carter [Tue, 23 Jul 2002 04:55:06 +0000 (04:55 +0000)]
* changed structure of REG_R_ENUM_VALUE structure since the BUFFER2
is not and [in/out] buffer
* registry value enumeration is working now for the Print\Forms
key. The format of the binary data is not quite right yet
but all installed forms are listed
Andrew Tridgell [Tue, 23 Jul 2002 03:40:40 +0000 (03:40 +0000)]
reran configure
Andrew Tridgell [Tue, 23 Jul 2002 03:39:55 +0000 (03:39 +0000)]
added LDAP_SET_REBIND_PROC_ARGS in acconfig.h
andrew, you seem to have added this test but don't use it. Do you
intend to use it later? If not then perhaps it can be removed.
also, when a test goes in configure.in you must also add it to
acconfig.h, or you end up breaking configure.
Andrew Tridgell [Tue, 23 Jul 2002 03:38:35 +0000 (03:38 +0000)]
removed the freebsd getgroups check now that we don't use it
Tim Potter [Mon, 22 Jul 2002 21:53:36 +0000 (21:53 +0000)]
Sync with APPLIANCE_HEAD branch (whitespace, const only)
Tim Potter [Mon, 22 Jul 2002 21:40:45 +0000 (21:40 +0000)]
Merge from APPLIANCE_HEAD.
Gerald Carter [Mon, 22 Jul 2002 21:02:18 +0000 (21:02 +0000)]
fix seg fault due to memory allocation goof.
Jeremy Allison [Mon, 22 Jul 2002 19:32:13 +0000 (19:32 +0000)]
Ensure we're root before opening a printer backend tdb.
Jeremy.
Andrew Tridgell [Mon, 22 Jul 2002 14:00:40 +0000 (14:00 +0000)]
fixed a segv in net time when the host is unavailable
Tim Potter [Sun, 21 Jul 2002 06:32:25 +0000 (06:32 +0000)]
Fix up dir drive call.
Tim Potter [Sun, 21 Jul 2002 04:55:11 +0000 (04:55 +0000)]
Name get and set dir drive functions consistently.
Andrew Bartlett [Sun, 21 Jul 2002 04:01:04 +0000 (04:01 +0000)]
More cleanups, and add a comment/hint not to clean somthing up in future :-)
Andrew Bartlett
Andrew Bartlett [Sun, 21 Jul 2002 03:34:02 +0000 (03:34 +0000)]
Add some const & static, remove unused functions.
Andrew Bartlett [Sun, 21 Jul 2002 03:26:10 +0000 (03:26 +0000)]
Another smattering of static and const
Andrew Bartlett [Sun, 21 Jul 2002 02:36:33 +0000 (02:36 +0000)]
Tpot missed one...
Andrew Bartlett [Sun, 21 Jul 2002 01:20:28 +0000 (01:20 +0000)]
Looks like I missed this earlier. We should connect as the specified workgroup
- sombody using smbspool won't always have a full smb.conf, and this is how it
was written in the first place anyway.
Again, found by the IRIX compiler.
Andrew Bartlett
Tim Potter [Sun, 21 Jul 2002 00:49:16 +0000 (00:49 +0000)]
Renamed all the new_cli_netlogon_* functions to cli_netlogon_*
as they're no longer new!
Andrew Bartlett [Sun, 21 Jul 2002 00:08:16 +0000 (00:08 +0000)]
More use of intermediate variables to avoid issues with pointer size and casts.
Andrew Bartlett
Andrew Bartlett [Sun, 21 Jul 2002 00:00:22 +0000 (00:00 +0000)]
Compilers do find bugs :-)
This was a mixup between the enum type NSS_STATUS and a BOOL (extra test for
equality).
Andrew Bartlett
Andrew Bartlett [Sat, 20 Jul 2002 23:55:17 +0000 (23:55 +0000)]
And a little more 'const'.
Tim Potter [Sat, 20 Jul 2002 21:56:26 +0000 (21:56 +0000)]
Don't try and sys_dup2(dbf->fd) if dbf == NULL.
Andrew Bartlett [Sat, 20 Jul 2002 14:01:40 +0000 (14:01 +0000)]
Oops, my bad. I forgot to assign this, so lookupnames wasn't doing much :-)
Gerald Carter [Sat, 20 Jul 2002 13:23:57 +0000 (13:23 +0000)]
another intermediate checkin on the way to enumerating forms
via the registry. There is a seg fault here which shouldn't
bother anyone until I can get it fixed. I just need
a check point in case I need to roll back to this version later on.
Andrew Bartlett [Sat, 20 Jul 2002 13:02:47 +0000 (13:02 +0000)]
More fixes towards warnings on the IRIX compiler
(and yes, some of these are real bugs)
In particular, the samr code was doing an &foo of various types, to a function
that assumed uint32. If time_t isn't 32 bits long, that broke.
They are assignment compatible however, so use that and an intermediate
variable.
Andrew Bartlett
Andrew Bartlett [Sat, 20 Jul 2002 12:03:11 +0000 (12:03 +0000)]
correctly declare global_myworkgroup to be the right size.
Andrew Bartlett
Andrew Bartlett [Sat, 20 Jul 2002 11:58:06 +0000 (11:58 +0000)]
Try to fix up warnings - particularly on the IRIX 64 bit compiler (which had a
distinction between uchar and char).
Lots of const etc.
Andrew Bartlett
Andrew Bartlett [Sat, 20 Jul 2002 11:06:37 +0000 (11:06 +0000)]
Add some const to try and get less warnings.
Andrew Bartlett
Andrew Bartlett [Sat, 20 Jul 2002 10:17:02 +0000 (10:17 +0000)]
Make it clear that the 'service' isn't to be touched. (Make it const).
Andrew Bartlett
Andrew Bartlett [Sat, 20 Jul 2002 10:07:47 +0000 (10:07 +0000)]
Update the smbd reply code a little:
I don't like the idea of muliple netprots - becouse I see potential problems
with people being able to maniplate internal samba variables.
This applies in particular to remote names, so don't allow muliple session
requests either.
Also remove a pstrcpy() from the tcon code, we really don't need it.
Andrew Bartlett
Andrew Bartlett [Sat, 20 Jul 2002 09:03:50 +0000 (09:03 +0000)]
Fix up char/uchar casts etc. Fix up comments on some of the password hash
wrappers.
Andrew Bartlett
Andrew Bartlett [Sat, 20 Jul 2002 08:59:58 +0000 (08:59 +0000)]
If we can't connect, make sure its a level 0 so we see it, and the reason.
Andrew Bartlett [Sat, 20 Jul 2002 08:44:34 +0000 (08:44 +0000)]
Move some startup time initialisation to server.c, so it is all in one place.
I'm not sure that we need that "dummy" talloc init, but anyway...
Also, add some 'const' to the table of smb reply functions.
Andrew Bartlett
Andrew Bartlett [Sat, 20 Jul 2002 07:02:45 +0000 (07:02 +0000)]
Add support for duplicating stderr into our logfiles.
This is for two things: To allow panic actions etc to pump out backtraces to
stderr and to allow vangrind to put its stuff in a logfile - making it possible
to debug smbd when launched from inetd.
I've also cleaned up some of the duplicate names in procedures between smbd and
nmbd.
Andrew Bartlett
Andrew Bartlett [Sat, 20 Jul 2002 06:55:05 +0000 (06:55 +0000)]
Add support for a weird behaviour apparently used by Win9X pass-through
authentication - we can have an NT hash in the LM hash feild.
(I need to double-check this fix with tpot, who discovered it).
Also remove silly casts back and forth between uchar and char.
Andrew Bartlett
Andrew Bartlett [Sat, 20 Jul 2002 06:52:42 +0000 (06:52 +0000)]
Update the usage for smbgroupedit to document -d for 'description'.
I think this one is due to metze.
Andrew Bartlett
Andrew Bartlett [Sat, 20 Jul 2002 06:50:47 +0000 (06:50 +0000)]
Add a wrapper for dup2() to our system.c
Andrew Bartlett
Andrew Bartlett [Sat, 20 Jul 2002 04:55:42 +0000 (04:55 +0000)]
NT_STATUS_UNSUCCESSFUL just gets clients confused - move to NO_LOGON_SERVERS
becouse thats what Win2k gives when the PDC is down.
Some of these might better go to other errors, but the Win2k text message for
'unsuccessful' is not particularly useful. (A device attached to the system is
not functioning...)
Andrew Bartlett
Gerald Carter [Sat, 20 Jul 2002 04:27:30 +0000 (04:27 +0000)]
enumeration of printers keys ( no data yet ) via the registry
functions now works :-)
Gerald Carter [Sat, 20 Jul 2002 02:42:04 +0000 (02:42 +0000)]
fixed a logic error in the sorted_tree_find_child() routine
that caused a valid search to fail. The printing registry
view now works again.
Gerald Carter [Fri, 19 Jul 2002 22:16:03 +0000 (22:16 +0000)]
fixed seg fault in registry frontend caused by trying to
use a destroyed TALLOC_CTX*
Tim Potter [Fri, 19 Jul 2002 22:01:23 +0000 (22:01 +0000)]
Fixed a compiler warning.
Jeremy Allison [Fri, 19 Jul 2002 19:56:27 +0000 (19:56 +0000)]
Never ignore valgrind messages :-). Don't reference before the start
of a string....
Jeremy.
Gerald Carter [Fri, 19 Jul 2002 18:49:44 +0000 (18:49 +0000)]
* refactored registry operations some. subkey lists and
registry values are now passed around in containers
(REGSUBKEY_CTR & REGVAL_CTR) which each possess a TALLOC_CTX.
* removed subkey_specific_fn() from REGISTRY_OPS. Is implemented
in the form of a wrapper
* temporarily broke the printing registry ops.
* implemented inheritence for the data_p of nodes in a SORTED_TREE
* All REGISTRY_KEY instances now store a valid REGISTRY_HOOK since
the default REGOSTRY_OPS structure is stored in the root of the
cache_tree.
* Probably some other change I forgot.... T
Jeremy Allison [Fri, 19 Jul 2002 17:14:19 +0000 (17:14 +0000)]
Allow trans2 and nttrans messages to be processed in oplock break state.
As noticed by Lev Iserovich <lev@ciprico.com> this seems to fix a problem
with oplock breaks and Win2k, and we are protected from problems by existing
code in trans2.c and nttrans.c
Jeremy.
Jeremy Allison [Fri, 19 Jul 2002 16:45:37 +0000 (16:45 +0000)]
Formatting fixup. Fix shadow warning.
Jeremy.