1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-10 13:57:47 +03:00

9142 Commits

Author SHA1 Message Date
Andrew Bartlett
2582e955e7 More use of intermediate variables to avoid issues with pointer size and casts.
Andrew Bartlett
(This used to be commit 88b68f79721b5fea7ddcad5a83b9555528c75c20)
2002-07-21 00:08:16 +00:00
Andrew Bartlett
4815976435 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)
2002-07-21 00:00:22 +00:00
Andrew Bartlett
c30f930262 And a little more 'const'.
(This used to be commit 2cbbf0ecd33774041dd831956935ab3cf69ce2a6)
2002-07-20 23:55:17 +00:00
Tim Potter
27211c55e2 Don't try and sys_dup2(dbf->fd) if dbf == NULL.
(This used to be commit 0fd155a06c24ec5d1310213baf7a4230242498be)
2002-07-20 21:56:26 +00:00
Andrew Bartlett
9d983e3f3a Oops, my bad. I forgot to assign this, so lookupnames wasn't doing much :-)
(This used to be commit 508106285380b772850238a8ed6b78a2c3334887)
2002-07-20 14:01:40 +00:00
Gerald Carter
6dd9f24d05 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)
2002-07-20 13:23:57 +00:00
Andrew Bartlett
29075c97d3 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)
2002-07-20 13:02:47 +00:00
Andrew Bartlett
9175bd2fe7 correctly declare global_myworkgroup to be the right size.
Andrew Bartlett
(This used to be commit 860f5b1a0c1898f1ce380d249610eeaaeb43b9e0)
2002-07-20 12:03:11 +00:00
Andrew Bartlett
ea9d3057e9 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)
2002-07-20 11:58:06 +00:00
Andrew Bartlett
aff20d822c Add some const to try and get less warnings.
Andrew Bartlett
(This used to be commit 2a3d821c77c7648de43b11dd951f6f16d7be5b3c)
2002-07-20 11:06:37 +00:00
Andrew Bartlett
750a1f9e58 Make it clear that the 'service' isn't to be touched. (Make it const).
Andrew Bartlett
(This used to be commit 6465c6727be15cd2e915710bdc3e2f4244ad2083)
2002-07-20 10:17:02 +00:00
Andrew Bartlett
17fc19fe31 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)
2002-07-20 10:07:47 +00:00
Andrew Bartlett
badbae319a Fix up char/uchar casts etc. Fix up comments on some of the password hash
wrappers.

Andrew Bartlett
(This used to be commit 95519d408caa7da00dbb2a8323cc4374a517cd69)
2002-07-20 09:03:50 +00:00
Andrew Bartlett
27ca538a3c If we can't connect, make sure its a level 0 so we see it, and the reason.
(This used to be commit 6129718bea458ceb7669ecabc8cf0c8f908c7074)
2002-07-20 08:59:58 +00:00
Andrew Bartlett
f65440ff52 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)
2002-07-20 08:44:34 +00:00
Andrew Bartlett
714abda3e7 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)
2002-07-20 07:02:45 +00:00
Andrew Bartlett
129b3966c0 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)
2002-07-20 06:55:05 +00:00
Andrew Bartlett
6081538818 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)
2002-07-20 06:52:42 +00:00
Andrew Bartlett
b96de65b26 Add a wrapper for dup2() to our system.c
Andrew Bartlett
(This used to be commit b24b6307f6b40e559aec441e0ebab8f666b87d9f)
2002-07-20 06:50:47 +00:00
Andrew Bartlett
5e0cffda3e 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)
2002-07-20 04:55:42 +00:00
Gerald Carter
b516eb62db enumeration of printers keys ( no data yet ) via the registry
functions now works :-)
(This used to be commit c5768538f6cf6ee824bc6e105a3391bbc2ea8e46)
2002-07-20 04:27:30 +00:00
Gerald Carter
39bbeff5b3 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)
2002-07-20 02:42:04 +00:00
Gerald Carter
3c0a9c46d8 fixed seg fault in registry frontend caused by trying to
use a destroyed TALLOC_CTX*
(This used to be commit 432b9f8d7c20fbf3b2a0906c8a93272abbe43fb6)
2002-07-19 22:16:03 +00:00
Tim Potter
12e237da68 Fixed a compiler warning.
(This used to be commit bc0f1c1ec21e69014426e41fb0a5264da63b857a)
2002-07-19 22:01:23 +00:00
Jeremy Allison
3c9e5a9416 Never ignore valgrind messages :-). Don't reference before the start
of a string....
Jeremy.
(This used to be commit 35f0fbd254c222d015bdc582277b90efbaade81e)
2002-07-19 19:56:27 +00:00
Gerald Carter
9fe3bd1259 * 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)
2002-07-19 18:49:44 +00:00
Jeremy Allison
80c8fe63d2 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)
2002-07-19 17:14:19 +00:00
Jeremy Allison
5f894476d8 Formatting fixup. Fix shadow warning.
Jeremy.
(This used to be commit beb298898d5700dcd775ee3b1f1965e67214e9e5)
2002-07-19 16:45:37 +00:00
Gerald Carter
af3d6270d7 merge from SAMBA_2_2 spotted by Simo
(This used to be commit 590c4ee076dcc14cb516c9ea04b47b1665c48ece)
2002-07-19 16:03:52 +00:00
Andrew Tridgell
ce16d9a26d fixed line buffer mode in XFILE
thanks to tim for finding this bug
(This used to be commit 91bff7545405ba88bc721f358ccdbf0aac0e3ba6)
2002-07-19 04:00:21 +00:00
Jeremy Allison
923a3a0e1c 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)
2002-07-18 23:43:33 +00:00
Jeremy Allison
7f98456fb3 Add useful VALGRIND #ifdef.
Jeremy.
(This used to be commit 07716f3a2316fedfe9a3210fd1dad8f7d1e4d9c8)
2002-07-18 23:28:47 +00:00
Jeremy Allison
958b0e3528 Prevent gcc warning about shadowed global "index".
Jeremy
(This used to be commit ae924493754220b8ad9e9767eb25f0f53a23327d)
2002-07-18 23:26:34 +00:00
Jeremy Allison
8305400685 Don't crash on setfileinfo on printer fsp.
Jeremy.
(This used to be commit 3a9ceb6b3b915d3153d9cb107f447b13002c0f57)
2002-07-18 23:25:19 +00:00
Jeremy Allison
4bc4a97e36 Fixed off-by-one in all_string_sub also.
Jeremy.
(This used to be commit 8b0e47fc1f00c76dfccb6c2b58188d9a5ae67c65)
2002-07-18 23:22:11 +00:00
Jeremy Allison
8e004fe00d Formatting fixups.
Jeremy.
(This used to be commit 4aa922a1afdd538f51d5eff4cb7af2694a88c591)
2002-07-18 23:21:45 +00:00
Jeremy Allison
687624fc18 Another bug found by valgrind. Don't AND a src length of -1.
Jeremy.
(This used to be commit a67079882dd1b924d2e007e39b06da438533ef96)
2002-07-18 23:01:44 +00:00
Gerald Carter
06ae9ac5d9 virtual registry framework with initial printing hooks.
(This used to be commit a43d9788fa8823d678ee72470421b980165ec2b0)
2002-07-18 23:00:24 +00:00
Gerald Carter
2afc1ca42c 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)
2002-07-18 22:55:48 +00:00
Simo Sorce
9154aa791e Unneded extra check on len
(This used to be commit e3b3c148208792ac2ccbfd468ad580b1264f9876)
2002-07-18 22:22:30 +00:00
Jeremy Allison
5d840349bd 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)
2002-07-18 19:15:49 +00:00
Jeremy Allison
a754c80ae0 Use of uninitialized variable caught by valgrind.
Jeremy.
(This used to be commit 44410af397c386f58067679012856150b07b47e8)
2002-07-18 01:50:58 +00:00
Jeremy Allison
29426b4a50 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)
2002-07-17 19:12:17 +00:00
Jeremy Allison
cc9511af8c Lanman print jobs are *16* bits, not 32. arggggh. Map them....
Jeremy.
(This used to be commit 2b06fd305be10fa8a8629adb4a99ccd3960786da)
2002-07-17 00:38:37 +00:00
Jeremy Allison
34ed527b13 print_jobid in the fsp struct should be uint32.
Jeremy.
(This used to be commit 51c8338c7ac8665fcaaac6de5f2d81b460e803f5)
2002-07-16 21:51:56 +00:00
Tim Potter
bb7de652ef Use codepage 850 as a default for the dos character set.
Tridge, is this OK?
(This used to be commit db5d91fedfe9355f4a79aee9dc60d77dd068b334)
2002-07-16 18:45:59 +00:00
Jeremy Allison
b3aeabedd0 Put printing tdbs in a subdirectory to prevent name collisions.
Jeremy.
(This used to be commit b013b9437557f2d427e4b646b49ad7d99e94c164)
2002-07-16 00:07:02 +00:00
Gerald Carter
78750803d0 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)
2002-07-15 22:27:07 +00:00
Samba Release Account
f8db530339 preparing for release of 3.0-alpha18
(This used to be commit 9556d3316cf262d14da4f3481d3e733b23d0862b)
2002-07-15 15:14:01 +00:00
Andrew Tridgell
159118de5c fixed a number of real bugs found by warnings on the 64 bit irix compiler
(This used to be commit 04de6bbc8055e5547af41b10e284b722f40e726d)
2002-07-15 10:54:35 +00:00