1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-01 05:47:28 +03:00

1437 Commits

Author SHA1 Message Date
Tim Potter
88d321becd Merge of netbios namecache code from APPLIANCE_HEAD.
Tridge suggested a generic caching mechanism for Samba to avoid the
proliferation of little cache files hanging around limpet like in the
locks directory.  Someone should probably implement this at some
stage.
(This used to be commit dad31483b3bd1790356ef1e40ac62624a403bce8)
2002-08-16 00:25:48 +00:00
Simo Sorce
10712f9a22 *** empty log message ***
(This used to be commit cb72eead70509eddaa051571f3eed3c46304b5f8)
2002-08-15 13:25:25 +00:00
Jim McDonough
f3a15363d8 Use byteorder.h macros
(This used to be commit eb9004efc3580799063009a8298c35cbc420626f)
2002-08-12 16:39:10 +00:00
Jim McDonough
d8d1d65958 Code to generate uuids for ADS setups. Uses our random generator but
conforms to standard OSF/DCE uuid format.
(This used to be commit 3b50c3b8cd86ff9a12a6e22ca3b3e904671be547)
2002-08-12 13:48:19 +00:00
Andrew Bartlett
dd5615c042 Make 'remote_machine' private to lib/substitute.c, and fix all the user to use
the new accessor functions.

Andrew Bartlett
(This used to be commit f393de2310e997d05674eb7f1268655373e03647)
2002-08-11 02:30:35 +00:00
Andrew Bartlett
6ddba1e99b Fix the %m security bug again - and try to make it harder to reintroduce in
future.

This moves us from fstrcpy() and global variables to 'get' and 'set' functions.

In particular, the 'set' function sainity-checks the input, in the same way as
we always have.

Andrew Bartlett
(This used to be commit e57a896f06b16fe7e336e1ae63a0c9e4cc75fd36)
2002-08-10 23:20:04 +00:00
Andrew Tridgell
4da476001e fixed a memory corruption bug in the wins code
(This used to be commit 3f6ca04003172c22d02111f2170ad60f0d7936d9)
2002-08-06 00:56:39 +00:00
Andrew Tridgell
ab0b4e6f58 make sure we zero the unusued elements in a SID when parsing
(This used to be commit aa5beb63f1b1133c4ad28118ddd33e21198d79bb)
2002-07-31 09:32:45 +00:00
Andrew Tridgell
4516a14dbb added support for smbd listening on port 445 and 139. It now listens
on both by default, and you can specify a list of ports to listen on
either with "smb ports = " in smb.conf or using the -p option to smbd.

this is needed for proper netbiosless operation.
(This used to be commit 5dee0a7b5e0fcb298a9d36661c80e60d8b9bcc3a)
2002-07-31 04:56:16 +00:00
Andrew Bartlett
01d9beba6c Make some of the charconv code a bit easier to read and work with - when we
are dealing with utf8 we may as well specify char** for the pointer, save
otherwise casting in the caller.

Andrew Bartlett
(This used to be commit 46021f85b6da4ba1e7f73ee7408079219d555dde)
2002-07-30 09:21:57 +00:00
Tim Potter
362f534fa1 Our include popt is starting to get a bit old - fixed some compile
problems here.

Also fixed some non-constant initialisers in samsync.
(This used to be commit 33bd7214736dafd5927d63af5f8510646b81e7df)
2002-07-29 23:50:54 +00:00
Tim Potter
6eaa06ac53 A place to store common popt routines.
(This used to be commit b5b64a4e90792000fc377a032cd5c7cb9918261b)
2002-07-29 09:23:01 +00:00
Simo Sorce
a4ec4acd61 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.
(This used to be commit 69765e4faa8aaae74c97afc917891fc72d80703d)
2002-07-28 18:10:39 +00:00
Andrew Tridgell
c4fcf56380 good security patch from Timothy.Sell@unisys.com
we could generate short passwords!
samba-patches 880
(This used to be commit 1466acba7e18f5ce733b376d031f1596a1a674d8)
2002-07-28 06:08:30 +00:00
Andrew Bartlett
74d235ff1a 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)
2002-07-28 02:20:15 +00:00
Andrew Bartlett
24675d99e5 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)
2002-07-24 05:26:32 +00:00
Andrew Tridgell
fef9d6187e 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)
2002-07-23 09:22:29 +00:00
Andrew Bartlett
afb7d1dc48 Another smattering of static and const
(This used to be commit 897cc4a610932e596f8a9807213166e380ef0203)
2002-07-21 03:26:10 +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
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
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
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
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
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
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
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
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-07-15 10:35:28 +00:00
Andrew Tridgell
c238b5c6a1 don't use C++ comments in C - it doesn't work on many compilers
(This used to be commit cf853314f9eda479c6f18bfc725fa0b5d88d0a38)
2002-07-15 09:43:34 +00:00
Andrew Tridgell
369040ac5d 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)
2002-07-15 03:59:14 +00:00
Simo Sorce
050126e684 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)
2002-07-14 22:21:40 +00:00
cvs2svn Import User
ec167dc9cc This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit b8d39651fb90ef170055735412417239a63afc5d) 2002-07-14 22:15:21 +00:00
Andrew Bartlett
d7bdcee189 make this a ZERO_STRUCTP for consitancy with the rest of Samba.
(This used to be commit 587a3d91b7226f4e96c4320322f62c6490a3c6ac)
2002-07-13 09:18:55 +00:00
Andrew Tridgell
a0489b36c1 fixed a stdin bug in XFILE that prevented 'print -' from working
(This used to be commit e66e354421b8be64a1b6774bde4d187532ee7690)
2002-07-13 04:28:01 +00:00
Jeremy Allison
e40abc248f The changes in make_sec_desc to make us match W2K broke the marshalling/unmarshalling of
security descriptors. We need to calculate the maximum offset and set the offset
back after reading/writing every field in the SEC_DESC.
This was *nasty* to find....
Jeremy.
(This used to be commit 175d43980e57c25582d8ab859f5730283e82f3b2)
2002-07-12 21:09:24 +00:00
Jeremy Allison
25148a148c *Experimental* new large-scaling printer code. Splits printing.tdb into
a separate tdb per printer, but only keeps (currently one) tdb open at
a time (although this is easily changed by changing a #define). Needs
scalability testing with large numbers of printers now....
Jeremy.
(This used to be commit b0909cfa14fc7ef29d2b98b56d52723570da782a)
2002-07-11 00:06:29 +00:00
Simo Sorce
fe23e902c6 some support functions to ease the next commit.
(This used to be commit 4be1c882be56ae0fe18bb134a1513e0e6f6965b0)
2002-07-09 23:59:46 +00:00
Andrew Tridgell
7f42c53971 the last WINS update broke self registration when we are a WINS
server. The real problem is all the special cases we had for when we
are a wins server as opposed to when we are using a 'real' wins
server.

This patch removes the special cases. We now accept non-broadcast
packets from ourselves and we use ourselves as a wins server when we
are one. This gets rid of the special cases and simplifies things
quite a bit.

It all seems to work, but there are bound to be problems found later.
(This used to be commit 3e843d30158d05cdfba716bac7e5c0a75ae7a79c)
2002-07-09 14:17:26 +00:00
Andrew Bartlett
21b9280cf5 Kill off const warnings - add a pile of const to various places.
(This used to be commit 1de04ec4735c19ec21cdef6e679cea17c734c5f6)
2002-07-08 02:14:57 +00:00
Andrew Bartlett
8dc39c1112 (this should have been part of the previous commit)
Add a function to display 'sid types' as strings - makes rpcclient outptut
and DEBUG() logs much eaiser to understand.

Move the enum for SID types to smb.h, becouse is really isn't LSA specific any
more.

Andrew Bartlett
(This used to be commit fc9739861104df4ddc93efab3275275307e4fbb9)
2002-07-08 00:40:57 +00:00
Andrew Bartlett
dd118a176a Fix the forword prototype to be a static for this static function.
(This used to be commit bb1aa5e1d2e4f71dfaab0ade24ed15d1b5fdfc33)
2002-07-03 06:48:52 +00:00
Jeremy Allison
82176f4d85 Address the string_sub problem by changing len = 0 to mean "no expand".
Went through and checked all string_subs I could to ensure they're being
used correctly.
Jeremy.
(This used to be commit 17cae0d683be404be69554cd0e84117bdcc56c87)
2002-07-02 06:34:27 +00:00
Andrew Tridgell
9930b0b065 used findstatic.pl to make some variables static and remove some dead
code
(This used to be commit 91ad9041e9507d36eb3f40c23c5d4df61f139ef0)
2002-07-01 09:12:41 +00:00