ira/wip.git
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)

21 years agofixed a call to get_current_groups()
Andrew Tridgell [Mon, 15 Jul 2002 09:46:54 +0000 (09:46 +0000)]
fixed a call to get_current_groups()
(This used to be commit 61c524e8102d4f5cdcf7c949b55b5dc67a320c74)

21 years agodon't use C++ comments in C - it doesn't work on many compilers
Andrew Tridgell [Mon, 15 Jul 2002 09:43:34 +0000 (09:43 +0000)]
don't use C++ comments in C - it doesn't work on many compilers
(This used to be commit cf853314f9eda479c6f18bfc725fa0b5d88d0a38)

21 years agofixed a problem with getgroups() where it could include our current
Andrew Tridgell [Mon, 15 Jul 2002 03:59:14 +0000 (03:59 +0000)]
fixed a problem with getgroups() where it could include our current
effective gid which could mean that the user gets group 0 in their
group list for acl interpretation

this is a replacement fix for the one richard did in 2.2 (which didn't
cope wiith variable behaviour depending on which nss module was in
use)
(This used to be commit cfc5ca3416cea5ea5d2ac34f5521cb6367e42cd2)

21 years agodon't report the faiilure of non-blocking locks. They are supposed to
Andrew Tridgell [Mon, 15 Jul 2002 03:51:53 +0000 (03:51 +0000)]
don't report the faiilure of non-blocking locks. They are supposed to
fail sometimes, thats why they are non-blocking :)
(This used to be commit 775b918b8c63b1fcd9a8db1743505ab718978c19)

21 years agoafter thinking about the env variable hack for avoiding group membership
Andrew Tridgell [Sun, 14 Jul 2002 23:45:55 +0000 (23:45 +0000)]
after thinking about the env variable hack for avoiding group membership
enumeration I realised it could be a security hole for setuid progs.

This adds a proper nss function instead.
(This used to be commit c7c49d87af5e9a0bef058e6d79188d8b11fefc02)

21 years agoaddedd new (t)alloc_sub_* functions
Simo Sorce [Sun, 14 Jul 2002 22:21:40 +0000 (22:21 +0000)]
addedd new (t)alloc_sub_* functions
they will get a const string and return a (t)alloced epanded one.
also modified passdb/* stuff to use this one.
(This used to be commit d378ac1e2efb0efc9a0f983d69cf678ca6255fd5)

21 years agothis is a trick to work around the fact that posix does not supply
Andrew Tridgell [Sun, 14 Jul 2002 22:15:20 +0000 (22:15 +0000)]
this is a trick to work around the fact that posix does not supply
a getgr*() function that lists groups without numerating all the
group members. Instead of definiing a new nss method (which might
cause problems) I added an environment variable WINBIND_GETGRLST
that tells winbind not to fill in the group members in a gergrent()
request. This can speed up group listing by a factor of 20 or more
(on my test system with 50000 groups it reduces the time from an hour
to 2 minutes)
(This used to be commit e3f73256d31ab9914daae49f41e984a534996870)

21 years agoShow the account flags in the 'verbose' listing of pdbedit.
Andrew Bartlett [Sun, 14 Jul 2002 08:38:09 +0000 (08:38 +0000)]
Show the account flags in the 'verbose' listing of pdbedit.

Andrew Bartlett
(This used to be commit b5ec92d7a2e5ba33b641267d2319d101d70a0d9a)

21 years agoApply patch from "Kai Krueger" <kai@kruegernetz.de> to make it easier to
Andrew Bartlett [Sun, 14 Jul 2002 08:37:31 +0000 (08:37 +0000)]
Apply patch from "Kai Krueger" <kai@kruegernetz.de> to make it easier to
determine what access masks should be applied to various SAMR calls.

Andrew Bartlett
(This used to be commit dbf28f992bcd4859a9b7d78ac1d33e4063617f94)

21 years agoFix up a botched prevoius commit.
Andrew Bartlett [Sun, 14 Jul 2002 04:51:57 +0000 (04:51 +0000)]
Fix up a botched prevoius commit.

The idea here is to allow invalid LM passwords in otherwise valid accounts.

This happens when we create an account without a password, for example.
Previously we would stop at the LM password, and not read things like the
account flags correctly.  Now we process the record, and just set the password
to NULL.

(Note, 'no password for access' is decided only on the basis of the Account
Control bits, not on the 'NULL' value of the password feild.).

Andrew Bartlett
(This used to be commit c590e0c970b5babf370924cef51530e5e215eaf2)

21 years agoremoved some meaningless const casts that were causing thousands of
Andrew Tridgell [Sun, 14 Jul 2002 04:11:21 +0000 (04:11 +0000)]
removed some meaningless const casts that were causing thousands of
warnings (literally!) for the irix compiler
(This used to be commit 35b6b46bc67104671298641e2993225bad2c9a39)

21 years agomove opt_machine_pass to keep some compilers happy
Andrew Tridgell [Sun, 14 Jul 2002 03:49:15 +0000 (03:49 +0000)]
move opt_machine_pass to keep some compilers happy
(This used to be commit 39e11ef5b1090e51c6c447c8037a43b52e04b881)

21 years agoMove nttrans.c into the NTSTATUS age.
Andrew Bartlett [Sun, 14 Jul 2002 01:23:46 +0000 (01:23 +0000)]
Move nttrans.c into the NTSTATUS age.

This could do with another eye looking over it, but it seems to work.

Andrew Bartlett
(This used to be commit e6746db60daa4a61a3ed4302e4105345984af6ac)

21 years agoadded useful 'net rpc info' command
Andrew Tridgell [Sat, 13 Jul 2002 15:14:39 +0000 (15:14 +0000)]
added useful 'net rpc info' command

this also gives a way to distinguish a 'native mode' server from a
non-native server. This call will fail for a native mode server.
(This used to be commit a7663428e05bdd41a1975d0db9be6537b7238b95)

21 years agoadded --machine-pass option to net. This allows you to authenticate as
Andrew Tridgell [Sat, 13 Jul 2002 11:42:53 +0000 (11:42 +0000)]
added --machine-pass option to net. This allows you to authenticate as
the current machine account and password. This is useful both for
diagnostics and domain leave.
(This used to be commit 73b246981fd5b27cc1d835946b89e82f5b78f332)

21 years agomake this a ZERO_STRUCTP for consitancy with the rest of Samba.
Andrew Bartlett [Sat, 13 Jul 2002 09:18:55 +0000 (09:18 +0000)]
make this a ZERO_STRUCTP for consitancy with the rest of Samba.
(This used to be commit 587a3d91b7226f4e96c4320322f62c6490a3c6ac)