sfrench/samba-autobuild/.git
21 years agoFix a missing 'no memory' return in last night's svrsvc code, and use
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
(This used to be commit e69b476626c802b1e1920f241733d0dd6d06a06e)

21 years agoWarn about n^2 algorithm with utmp=yes.
Andrew Bartlett [Sun, 28 Jul 2002 02:36:16 +0000 (02:36 +0000)]
Warn about n^2 algorithm with utmp=yes.

Andrew Bartlett
(This used to be commit 70929a970e7ca0488a6c9ed8664a6857d86349eb)

21 years agoAnother item off my long-term todo list:
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
(This used to be commit 50507e131dac19485a2561f3448da7334e357f50)

21 years agoIt seems I didn't need to write a dup2() wrapper - as we already use it a
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
(This used to be commit d78cce806d967d0442b153242ba2061f1b14b6b6)

21 years agoClean this code up a little. If it's alrady asprintf()ed, I see no
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...
(This used to be commit 71452365c8d9aa3d06b64716636a32bfebd3d4f8)

21 years agoA very long time ago (actually 6 months ago) I promised to commit this code
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
(This used to be commit f9bac7c5c2c4ddf0bf39d596a7b922fbb17c6b16)

21 years agoUpdate the rebind code in pdb_ldap.
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
(This used to be commit 064f269508d05cc833cf7bfd5613e4fe389f32dc)

21 years agoThis should fix a nastly little bug where if a user had already done one
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
(This used to be commit 5d2c7816a3ea02a67c5b501626d91d43557e9dd9)

21 years agonice day today
Simo Sorce [Sat, 27 Jul 2002 02:33:49 +0000 (02:33 +0000)]
nice day today
add also hide unwriteable as per user request
(This used to be commit e6b38a881b67af5365f84e52f9cd6dcfec82bf2f)

21 years agoas per user request added windbind start/stop/restart in swat
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.
(This used to be commit e0988e918667e3bc7b7cfb19ae81bf8c05fe582a)

21 years agoRafal 'Mimir' Szczesniak <mimir@diament.ists.pwr.wroc.pl> has been busy
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.
(This used to be commit f0890026820ee3e432147130b46de4610e583381)

21 years ago3 things:
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).
(This used to be commit 5640e6cdb213502d95fff33e06eaeed5ce3aeb76)

21 years agofix parameters for ldap_set_rebind_proc() from OpenLDAP 2.1
Gerald Carter [Fri, 26 Jul 2002 21:49:56 +0000 (21:49 +0000)]
fix parameters for ldap_set_rebind_proc() from OpenLDAP 2.1
(This used to be commit a6725d4ce95ca8807ccefe4ce033b45d0635da6d)

21 years ago(another patch from mimir)
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
(This used to be commit 2b6a318d686ac0b08a30844bf2960703b06d5c90)

21 years agoMimir has been busy with patches again, and sent in the following
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 :)
(This used to be commit 888d595fab4f6b28318b743f47378cb7ca35d479)

21 years agoI think this makes the debug statement clearer.
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
(This used to be commit bea31062a261a49b65800a15d47f8b011af632f6)

21 years agoClarify this comment.
Andrew Bartlett [Fri, 26 Jul 2002 07:18:15 +0000 (07:18 +0000)]
Clarify this comment.
(This used to be commit d2b4e669aeada9c3498c3a9e49360270def5ad99)

21 years agoPrint out a friendly message on error instead of a python exception when
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.
(This used to be commit 2adcd0eb4362a20824d1f34b63c0f405a7803872)

21 years agoI had forgotten to commit this after running configure
Andrew Tridgell [Thu, 25 Jul 2002 15:43:06 +0000 (15:43 +0000)]
I had forgotten to commit this after running configure
(This used to be commit e3c2ef0a04afe0a21432940fceae2db07da730d8)

21 years ago* fix return code so we don't let a client just open any key it wants
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)
(This used to be commit 915ee5c0ec0467fea23be8f309bcaa085c6ed9dd)

21 years agodone! printer_info_2, devicemode, sec_desc, & printer data all enumerate
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.
(This used to be commit 2a30c243ec28734bbc721dfc01b743faa6f73788)

21 years agoreran configure
Andrew Tridgell [Wed, 24 Jul 2002 08:39:17 +0000 (08:39 +0000)]
reran configure
(This used to be commit d76e0838cf94ef3fd32d79d03b8e89971587bc2c)

21 years agoseveral changes in this checkin
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....
(This used to be commit 419d7208e8384e4ad2c4dd328ad5e630971bc76c)

21 years agoIf lp_add_home() fails, don't go any further, just return -1.
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
(This used to be commit 2febc7ce1aa6b01ec68bd007ce0286813dff301d)

21 years agoMake it possible to query account policy values from pdbedit (set to come soon).
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
(This used to be commit c5b5e3d653f5c38a283d901a409be6603d5103f7)

21 years agoActually check the return value of the account_policy_get() call.
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
(This used to be commit a7b0a2334cd8e7234c5bcb284e4c6de7a8e45f98)

21 years agoWe must be root to access the passdb, so ensure all calls to local_lookup_sid()
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
(This used to be commit 83360b211a7e834306d3e549c18bc41576534417)

21 years agoAdd another message rather than 'internal module error'
Andrew Bartlett [Wed, 24 Jul 2002 03:13:43 +0000 (03:13 +0000)]
Add another message rather than 'internal module error'

Andrew Bartlett
(This used to be commit e09c4bd69aaec0dc43b5bf69f651cbfad3c5f4ad)

21 years agoGive an idea what service didn't have the directory.
Andrew Bartlett [Wed, 24 Jul 2002 03:00:14 +0000 (03:00 +0000)]
Give an idea what service didn't have the directory.
(This used to be commit 0229f610a8cf9e82618cc6850a431ac89ffc7630)

21 years agoimplemented getgrouplist() for systems that don't have it and use it
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
(This used to be commit 44e92b6523ca2c119c2562df22eb71138dca9d9d)

21 years ago* fix to display correct form information in REG_BINARY information
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.
(This used to be commit 88f0e68bc631f1a0032056bc6c7b9213e8a15be8)

21 years ago* changed structure of REG_R_ENUM_VALUE structure since the BUFFER2
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
(This used to be commit 998eb9c7312c3c9a9ed1e9ec294593503c0304bf)

21 years agoreran configure
Andrew Tridgell [Tue, 23 Jul 2002 03:40:40 +0000 (03:40 +0000)]
reran configure
(This used to be commit 54c7ad47e13d92efd4c4dae2654e2e62927487e5)

21 years agoadded LDAP_SET_REBIND_PROC_ARGS in acconfig.h
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.
(This used to be commit 496cd0876cc13e2dd25c6ddbfe04c5787dddb4dd)

21 years agoremoved the freebsd getgroups check now that we don't use it
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
(This used to be commit d25dc761374ac832e2c5f6b32b7a468ea5a8591e)

21 years agoSync with APPLIANCE_HEAD branch (whitespace, const only)
Tim Potter [Mon, 22 Jul 2002 21:53:36 +0000 (21:53 +0000)]
Sync with APPLIANCE_HEAD branch (whitespace, const only)
(This used to be commit 11229aa88b60d820ba714f2c793fe6932ec67a6b)

21 years agoMerge from APPLIANCE_HEAD.
Tim Potter [Mon, 22 Jul 2002 21:40:45 +0000 (21:40 +0000)]
Merge from APPLIANCE_HEAD.
(This used to be commit 825cdc49dbc3e6b9d08b8e722c82cc09e2479fa1)

21 years agofix seg fault due to memory allocation goof.
Gerald Carter [Mon, 22 Jul 2002 21:02:18 +0000 (21:02 +0000)]
fix seg fault due to memory allocation goof.
(This used to be commit 8e94f68a80bda0cbc989fb36466dfbc17a07079d)

21 years agoEnsure we're root before opening a printer backend tdb.
Jeremy Allison [Mon, 22 Jul 2002 19:32:13 +0000 (19:32 +0000)]
Ensure we're root before opening a printer backend tdb.
Jeremy.
(This used to be commit 48ab4ae4221ed0be34c269e01a4e8b6bc93f87d7)

21 years agofixed a segv in net time when the host is unavailable
Andrew Tridgell [Mon, 22 Jul 2002 14:00:40 +0000 (14:00 +0000)]
fixed a segv in net time when the host is unavailable
(This used to be commit f4f2b613a2a804a6d2e5e78cc7dd7f3482675fcd)

21 years agoFix up dir drive call.
Tim Potter [Sun, 21 Jul 2002 06:32:25 +0000 (06:32 +0000)]
Fix up dir drive call.
(This used to be commit fe229cc126a4bfdce12882ac7eaa893e00cd506e)

21 years agoName get and set dir drive functions consistently.
Tim Potter [Sun, 21 Jul 2002 04:55:11 +0000 (04:55 +0000)]
Name get and set dir drive functions consistently.
(This used to be commit 290a304d2c1b70d20129236e20a0ff664179023e)

21 years agoMore cleanups, and add a comment/hint not to clean somthing up in future :-)
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
(This used to be commit 21b0e8f560849be77bde463cf006ea0de54211e9)

21 years agoAdd some const & static, remove unused functions.
Andrew Bartlett [Sun, 21 Jul 2002 03:34:02 +0000 (03:34 +0000)]
Add some const & static, remove unused functions.
(This used to be commit 993ee671cc11a95d0d0aa6d60883e03bb473290d)

21 years agoAnother smattering of static and const
Andrew Bartlett [Sun, 21 Jul 2002 03:26:10 +0000 (03:26 +0000)]
Another smattering of static and const
(This used to be commit 897cc4a610932e596f8a9807213166e380ef0203)

21 years agoTpot missed one...
Andrew Bartlett [Sun, 21 Jul 2002 02:36:33 +0000 (02:36 +0000)]
Tpot missed one...
(This used to be commit 28373e5bc2acc09a9e4c9dab3f76c21d04850dde)

21 years agoLooks like I missed this earlier. We should connect as the specified workgroup
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
(This used to be commit 31181158766cd5f0e8409854f3c304f6fb46582b)

21 years agoRenamed all the new_cli_netlogon_* functions to cli_netlogon_*
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!
(This used to be commit 277f6bbb9a63541a473a80a7994e9bde5c6f22dc)

21 years agoMore use of intermediate variables to avoid issues with pointer size and casts.
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
(This used to be commit 88b68f79721b5fea7ddcad5a83b9555528c75c20)

21 years agoCompilers do find bugs :-)
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
(This used to be commit 63b7820b6585608c0ebb582ec8b28ed3c949a1f4)

21 years agoAnd a little more 'const'.
Andrew Bartlett [Sat, 20 Jul 2002 23:55:17 +0000 (23:55 +0000)]
And a little more 'const'.
(This used to be commit 2cbbf0ecd33774041dd831956935ab3cf69ce2a6)

21 years agoDon't try and sys_dup2(dbf->fd) if dbf == NULL.
Tim Potter [Sat, 20 Jul 2002 21:56:26 +0000 (21:56 +0000)]
Don't try and sys_dup2(dbf->fd) if dbf == NULL.
(This used to be commit 0fd155a06c24ec5d1310213baf7a4230242498be)

21 years agoOops, my bad. I forgot to assign this, so lookupnames wasn't doing much :-)
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 :-)
(This used to be commit 508106285380b772850238a8ed6b78a2c3334887)

21 years agoanother intermediate checkin on the way to enumerating forms
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.
(This used to be commit e62ae94823461e142978a786b2860ea97906cfb3)

21 years agoMore fixes towards warnings on the IRIX compiler
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
(This used to be commit 30d0998c8c1a1d4de38ef0fbc83c2b763e05a3e6)

21 years agocorrectly declare global_myworkgroup to be the right size.
Andrew Bartlett [Sat, 20 Jul 2002 12:03:11 +0000 (12:03 +0000)]
correctly declare global_myworkgroup to be the right size.

Andrew Bartlett
(This used to be commit 860f5b1a0c1898f1ce380d249610eeaaeb43b9e0)

21 years agoTry to fix up warnings - particularly on the IRIX 64 bit compiler (which had a
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
(This used to be commit 8196ee908e10db2119e480fe1b0a71b31a16febc)

21 years agoAdd some const to try and get less warnings.
Andrew Bartlett [Sat, 20 Jul 2002 11:06:37 +0000 (11:06 +0000)]
Add some const to try and get less warnings.

Andrew Bartlett
(This used to be commit 2a3d821c77c7648de43b11dd951f6f16d7be5b3c)

21 years agoMake it clear that the 'service' isn't to be touched. (Make it const).
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
(This used to be commit 6465c6727be15cd2e915710bdc3e2f4244ad2083)

21 years agoUpdate the smbd reply code a little:
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
(This used to be commit 2afa291404cfd8dae11120e5e470c38ba067c4b2)

21 years agoFix up char/uchar casts etc. Fix up comments on some of the password hash
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
(This used to be commit 95519d408caa7da00dbb2a8323cc4374a517cd69)

21 years agoIf we can't connect, make sure its a level 0 so we see it, and the reason.
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.
(This used to be commit 6129718bea458ceb7669ecabc8cf0c8f908c7074)

21 years agoMove some startup time initialisation to server.c, so it is all in one place.
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
(This used to be commit 790b7c9ab82f930da66426e7a932d7365bd27725)

21 years agoAdd support for duplicating stderr into our logfiles.
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
(This used to be commit 4bcb32731984b4aef1d4911a168a4e7a10d32fd4)

21 years agoAdd support for a weird behaviour apparently used by Win9X pass-through
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
(This used to be commit 07e2b36311f91d7a20865a2ccc94716772e53fd7)

21 years agoUpdate the usage for smbgroupedit to document -d for 'description'.
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
(This used to be commit bce3a2b1d893d83f701205d7969569571f6279b0)

21 years agoAdd a wrapper for dup2() to our system.c
Andrew Bartlett [Sat, 20 Jul 2002 06:50:47 +0000 (06:50 +0000)]
Add a wrapper for dup2() to our system.c

Andrew Bartlett
(This used to be commit b24b6307f6b40e559aec441e0ebab8f666b87d9f)

21 years agoNT_STATUS_UNSUCCESSFUL just gets clients confused - move to NO_LOGON_SERVERS
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
(This used to be commit 656f1d68e8579f1bd0a7118caf9e0373d5980a69)

21 years agoenumeration of printers keys ( no data yet ) via the registry
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 :-)
(This used to be commit c5768538f6cf6ee824bc6e105a3391bbc2ea8e46)

21 years agofixed a logic error in the sorted_tree_find_child() routine
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.
(This used to be commit 2050859f03493d5135984ce1e42baf8f1f2566b9)

21 years agofixed seg fault in registry frontend caused by trying to
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*
(This used to be commit 432b9f8d7c20fbf3b2a0906c8a93272abbe43fb6)

21 years agoFixed a compiler warning.
Tim Potter [Fri, 19 Jul 2002 22:01:23 +0000 (22:01 +0000)]
Fixed a compiler warning.
(This used to be commit bc0f1c1ec21e69014426e41fb0a5264da63b857a)

21 years agoNever ignore valgrind messages :-). Don't reference before the start
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.
(This used to be commit 35f0fbd254c222d015bdc582277b90efbaade81e)

21 years ago* refactored registry operations some. subkey lists and
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
(This used to be commit e7b55e8f017e638342d9c8c1a9259000745a0298)

21 years agoAllow trans2 and nttrans messages to be processed in oplock break state.
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.
(This used to be commit e3f7d6c03f100962395763a5066313d60b4761d0)

21 years agoFormatting fixup. Fix shadow warning.
Jeremy Allison [Fri, 19 Jul 2002 16:45:37 +0000 (16:45 +0000)]
Formatting fixup. Fix shadow warning.
Jeremy.
(This used to be commit beb298898d5700dcd775ee3b1f1965e67214e9e5)

21 years agomerge from SAMBA_2_2 spotted by Simo
Gerald Carter [Fri, 19 Jul 2002 16:03:52 +0000 (16:03 +0000)]
merge from SAMBA_2_2 spotted by Simo
(This used to be commit 590c4ee076dcc14cb516c9ea04b47b1665c48ece)

21 years agofixed line buffer mode in XFILE
Andrew Tridgell [Fri, 19 Jul 2002 04:00:21 +0000 (04:00 +0000)]
fixed line buffer mode in XFILE
thanks to tim for finding this bug
(This used to be commit 91bff7545405ba88bc721f358ccdbf0aac0e3ba6)

21 years agoPrevious fix was incorrect. len in string_sub and all_string_sub is
Jeremy Allison [Thu, 18 Jul 2002 23:43:33 +0000 (23:43 +0000)]
Previous fix was incorrect. len in string_sub and all_string_sub is
number of *bytes*. >= check was correct, the len=0 case needed changing
to len = ls + 1.
Jeremy.
(This used to be commit 06a4a6d30ade5ea4d123ae640393677c9a510763)

21 years agoAdd useful VALGRIND #ifdef.
Jeremy Allison [Thu, 18 Jul 2002 23:28:47 +0000 (23:28 +0000)]
Add useful VALGRIND #ifdef.
Jeremy.
(This used to be commit 07716f3a2316fedfe9a3210fd1dad8f7d1e4d9c8)

21 years agoPrevent gcc warning about shadowed global "index".
Jeremy Allison [Thu, 18 Jul 2002 23:26:34 +0000 (23:26 +0000)]
Prevent gcc warning about shadowed global "index".
Jeremy
(This used to be commit ae924493754220b8ad9e9767eb25f0f53a23327d)

21 years agoDon't crash on setfileinfo on printer fsp.
Jeremy Allison [Thu, 18 Jul 2002 23:25:19 +0000 (23:25 +0000)]
Don't crash on setfileinfo on printer fsp.
Jeremy.
(This used to be commit 3a9ceb6b3b915d3153d9cb107f447b13002c0f57)

21 years agoFixed off-by-one in all_string_sub also.
Jeremy Allison [Thu, 18 Jul 2002 23:22:11 +0000 (23:22 +0000)]
Fixed off-by-one in all_string_sub also.
Jeremy.
(This used to be commit 8b0e47fc1f00c76dfccb6c2b58188d9a5ae67c65)

21 years agoFormatting fixups.
Jeremy Allison [Thu, 18 Jul 2002 23:21:45 +0000 (23:21 +0000)]
Formatting fixups.
Jeremy.
(This used to be commit 4aa922a1afdd538f51d5eff4cb7af2694a88c591)

21 years agoAnother bug found by valgrind. Don't AND a src length of -1.
Jeremy Allison [Thu, 18 Jul 2002 23:01:44 +0000 (23:01 +0000)]
Another bug found by valgrind. Don't AND a src length of -1.
Jeremy.
(This used to be commit a67079882dd1b924d2e007e39b06da438533ef96)

21 years agovirtual registry framework with initial printing hooks.
Gerald Carter [Thu, 18 Jul 2002 23:00:24 +0000 (23:00 +0000)]
virtual registry framework with initial printing hooks.
(This used to be commit a43d9788fa8823d678ee72470421b980165ec2b0)

21 years agoThe previous code would not allow things like string_sub(str, "\\", "/", 0).
Gerald Carter [Thu, 18 Jul 2002 22:55:48 +0000 (22:55 +0000)]
The previous code would not allow things like string_sub(str, "\\", "/", 0).
It complained about an overflow of 0 bytes.

Jeremy please check since you modified this last.
(This used to be commit a5aad760061e21635319a9b5628990cf59b827ed)

21 years agoUnneded extra check on len
Simo Sorce [Thu, 18 Jul 2002 22:22:30 +0000 (22:22 +0000)]
Unneded extra check on len
(This used to be commit e3b3c148208792ac2ccbfd468ad580b1264f9876)

21 years agoWe have to look at the length before checking for "~" as the string
Jeremy Allison [Thu, 18 Jul 2002 19:15:49 +0000 (19:15 +0000)]
We have to look at the length before checking for "~" as the string
may be shorter than 6 chars. Caught by valgrind.
Jeremy.
(This used to be commit b846bbfa831922b0be52e54804a46d7870895bfc)

21 years agoUse of uninitialized variable caught by valgrind.
Jeremy Allison [Thu, 18 Jul 2002 01:50:58 +0000 (01:50 +0000)]
Use of uninitialized variable caught by valgrind.
Jeremy.
(This used to be commit 44410af397c386f58067679012856150b07b47e8)

21 years agoGone back to explicit queue number passing as snum - removed encoding of
Jeremy Allison [Wed, 17 Jul 2002 19:12:17 +0000 (19:12 +0000)]
Gone back to explicit queue number passing as snum - removed encoding of
queueid in job number. This means we must have an internal tdb to store
mapping from 16 bit RAP jobid's to 32 bit RPC jobids.
Jeremy.
(This used to be commit 4ff64f69706cc94d5dba7762754d00790c476963)

21 years agoLanman print jobs are *16* bits, not 32. arggggh. Map them....
Jeremy Allison [Wed, 17 Jul 2002 00:38:37 +0000 (00:38 +0000)]
Lanman print jobs are *16* bits, not 32. arggggh. Map them....
Jeremy.
(This used to be commit 2b06fd305be10fa8a8629adb4a99ccd3960786da)

21 years agoprint_jobid in the fsp struct should be uint32.
Jeremy Allison [Tue, 16 Jul 2002 21:51:56 +0000 (21:51 +0000)]
print_jobid in the fsp struct should be uint32.
Jeremy.
(This used to be commit 51c8338c7ac8665fcaaac6de5f2d81b460e803f5)

21 years agoUse codepage 850 as a default for the dos character set.
Tim Potter [Tue, 16 Jul 2002 18:45:59 +0000 (18:45 +0000)]
Use codepage 850 as a default for the dos character set.

Tridge, is this OK?
(This used to be commit db5d91fedfe9355f4a79aee9dc60d77dd068b334)

21 years agoPut printing tdbs in a subdirectory to prevent name collisions.
Jeremy Allison [Tue, 16 Jul 2002 00:07:02 +0000 (00:07 +0000)]
Put printing tdbs in a subdirectory to prevent name collisions.
Jeremy.
(This used to be commit b013b9437557f2d427e4b646b49ad7d99e94c164)

21 years agosplitting off storage/retrieval routines for abstracting the
Gerald Carter [Mon, 15 Jul 2002 22:27:07 +0000 (22:27 +0000)]
splitting off storage/retrieval routines for abstracting the
registry view front end.  Now to plug in the various hooks.
(This used to be commit 9772acd9ad44af2800dfb9d8610c2d5c23eaceb4)

21 years agopreparing for release of 3.0-alpha18
Samba Release Account [Mon, 15 Jul 2002 15:14:01 +0000 (15:14 +0000)]
preparing for release of 3.0-alpha18
(This used to be commit 9556d3316cf262d14da4f3481d3e733b23d0862b)

21 years agofixed a number of real bugs found by warnings on the 64 bit irix compiler
Andrew Tridgell [Mon, 15 Jul 2002 10:54:35 +0000 (10:54 +0000)]
fixed a number of real bugs found by warnings on the 64 bit irix compiler
(This used to be commit 04de6bbc8055e5547af41b10e284b722f40e726d)

21 years agoenum_group_mapping takes an enum not an int
Andrew Tridgell [Mon, 15 Jul 2002 10:38:34 +0000 (10:38 +0000)]
enum_group_mapping takes an enum not an int
(This used to be commit 67a3ca2f235e011472dbe505ce7c34b26f92c44c)

21 years agochecking for NULL really is counter-productive, and this one was also
Andrew Tridgell [Mon, 15 Jul 2002 10:37:42 +0000 (10:37 +0000)]
checking for NULL really is counter-productive, and this one was also
generating a warning
(This used to be commit cd82ba41b8df024f034fcfa24e967ed8c3c8d035)