samba.git
13 years agor5365: Initial code for adding user accounts via libnet call.
Rafal Szczesniak [Sun, 13 Feb 2005 00:48:21 +0000 (00:48 +0000)]
r5365: Initial code for adding user accounts via libnet call.

rafal
(This used to be commit c5fdc38b176acc70bfc163fbf1e6cf4ef67197f5)

13 years agor5364: Rename string fields called 'domain' and 'name' to be 'domain_name'.
Tim Potter [Sun, 13 Feb 2005 00:26:43 +0000 (00:26 +0000)]
r5364: Rename string fields called 'domain' and 'name' to be 'domain_name'.
(This used to be commit 6749b9404d4e9876ecd964e038c608f05d2c0b69)

13 years agor5363: - ndr_%_ptr -> ndr_%_unique_ptr
Jelmer Vernooij [Sun, 13 Feb 2005 00:07:17 +0000 (00:07 +0000)]
r5363: - ndr_%_ptr -> ndr_%_unique_ptr
- ndr_%_relative% -> ndr_%_relative_ptr%
- Change pointer_default() default to "unique"
  (DCE uses "ptr" as default, MIDL doesn't follow the standard and uses "unique")
(This used to be commit 53b4ecbcc7a8da67cde1377de6f24a3de6d229e3)

13 years agor5362: Add pointer_default() support to pidl. pointer_default()
Jelmer Vernooij [Sat, 12 Feb 2005 23:03:26 +0000 (23:03 +0000)]
r5362: Add pointer_default() support to pidl. pointer_default()
is assumed to be "ptr" if not specified (just like midl).

The validator will warn when "ptr" is used at the moment, because
pidl only supports unique, ref and relative at the moment.
(This used to be commit 31bed62a9a6f7830f523d509b67970648d40aaef)

13 years agor5361: Rename some functions, add tests to validator.
Jelmer Vernooij [Sat, 12 Feb 2005 21:43:08 +0000 (21:43 +0000)]
r5361: Rename some functions, add tests to validator.
(This used to be commit c9d7b88756039a3eb3024c886851e489c46ef67f)

13 years agor5360: Remove a couple of unused functions.
Jelmer Vernooij [Sat, 12 Feb 2005 19:28:23 +0000 (19:28 +0000)]
r5360: Remove a couple of unused functions.
(This used to be commit d8a0a6972156c3211001b7f98e990c167be2468c)

13 years agor5358: - added initial WINS server code. It passes most of the NBT-WINS test, but...
Andrew Tridgell [Sat, 12 Feb 2005 11:33:42 +0000 (11:33 +0000)]
r5358: - added initial WINS server code. It passes most of the NBT-WINS test, but doesn't yet
  do secure server WACK responses

- added a ldap_string_to_time() function, for converting a LDAP
  formatted time to a time_t
(This used to be commit 9aa3313b3f93e47e3f93028e072f6a23b3c22385)

13 years agor5357: added ldb_msg_add_fmt(), for creating formatted ldb record values
Andrew Tridgell [Sat, 12 Feb 2005 11:30:33 +0000 (11:30 +0000)]
r5357: added ldb_msg_add_fmt(), for creating formatted ldb record values
(This used to be commit 18fb48204f4c0e22ea7e61575b3f174f30ff035c)

13 years agor5356: fixed the hex coding for nbt names
Andrew Tridgell [Sat, 12 Feb 2005 03:10:50 +0000 (03:10 +0000)]
r5356: fixed the hex coding for nbt names
(This used to be commit e467715c63624e165b79b37bd21b381d7a99d0fe)

13 years agor5353: Throw a NTSTATUS exception if a NT error code is returned.
Tim Potter [Sat, 12 Feb 2005 01:05:16 +0000 (01:05 +0000)]
r5353: Throw a NTSTATUS exception if a NT error code is returned.
(This used to be commit 4a9677833167b3b26117ab1b4e7c682d9524a206)

13 years agor5352: added a function nbt_name_string() that formats a nbt_name structure
Andrew Tridgell [Sat, 12 Feb 2005 01:00:15 +0000 (01:00 +0000)]
r5352: added a function nbt_name_string() that formats a nbt_name structure
as a human readable string. The format is designed to be able to be
used as the DN for the WINS database as well, while coping with
arbitrary bytes in the name (except nul bytes)
(This used to be commit aac3090e3504ba07124a9d480322a98efb97175e)

13 years agor5351: Add wrapper for nt_errstr and array functions for samr_ConnectInfo.
Tim Potter [Sat, 12 Feb 2005 00:54:11 +0000 (00:54 +0000)]
r5351: Add wrapper for nt_errstr and array functions for samr_ConnectInfo.
(This used to be commit be37749ac7d128fcabf82bad104d87098e2d9f55)

13 years agor5350: Implement an input typemap for NTSTATUS.
Tim Potter [Sat, 12 Feb 2005 00:53:32 +0000 (00:53 +0000)]
r5350: Implement an input typemap for NTSTATUS.
(This used to be commit 076ec6008e4dbd130044893f34c3fd7212bf667d)

13 years agor5348: Implement the remaining samr connect functions and fix up setsecurity.
Tim Potter [Sat, 12 Feb 2005 00:40:00 +0000 (00:40 +0000)]
r5348: Implement the remaining samr connect functions and fix up setsecurity.
(This used to be commit 4b2c3c7ac56e1e428dec6205e4e69268be84cac6)

13 years agor5347: fixed the NBT-REGISTER test now that the nbt layer is case sensitive
Andrew Tridgell [Fri, 11 Feb 2005 23:55:15 +0000 (23:55 +0000)]
r5347: fixed the NBT-REGISTER test now that the nbt layer is case sensitive
(This used to be commit ae514f076298caeb8a84d47939c4e51f9ab5b6ce)

13 years agor5346: - a bit more preparation for the WINS server going in
Andrew Tridgell [Fri, 11 Feb 2005 23:54:37 +0000 (23:54 +0000)]
r5346: - a bit more preparation for the WINS server going in

- more NBT packet asserts, to ensure that incoming requests have all
  the elements we depend on

- open the WINS database at startup if we are configured as a WINS server

- split out the nbtd server reply packet generation code so it can be
  shared by the WINS server

- re-did the logic of what is answered by the WINS server and what by
  the B node server. It now always tries to answer by the B node, and
  only "recurses" to the WINS server for names that are not found.
(This used to be commit 5613e6b8ad9b32639caf5055f793dbc4d0a2fc19)

13 years agor5345: Some more minor code readability fixes.
Jelmer Vernooij [Fri, 11 Feb 2005 23:21:06 +0000 (23:21 +0000)]
r5345: Some more minor code readability fixes.
(This used to be commit 10f3bdce80ff67e05b14c3481a05362b054d1f11)

13 years agor5338: More efforts to handle types similarly.
Jelmer Vernooij [Fri, 11 Feb 2005 15:49:15 +0000 (15:49 +0000)]
r5338: More efforts to handle types similarly.
(This used to be commit 95c4f3149925ee71e74ea36fae3a65d2eebf717c)

13 years agor5335: Add a Close() method to SamrHandle object.
Tim Potter [Fri, 11 Feb 2005 11:18:19 +0000 (11:18 +0000)]
r5335: Add a Close() method to SamrHandle object.

Add methods for {Query,Set}Security, Shutdown, CreateUser,
Open{User,Group,Alias} and RidToSid.

Time for a torture test I think!
(This used to be commit 94a3ff2380071efccf19ca51488753d3513ab63c)

13 years agor5334: Bah, it's all to hard...
Andrew Bartlett [Fri, 11 Feb 2005 10:50:54 +0000 (10:50 +0000)]
r5334: Bah, it's all to hard...

Andrew Bartlett
(This used to be commit a28ca320dc604fcffe89e9096a643bb4740a1da2)

13 years agor5333: weird, w2k3 always sends a positive name release response, even for names...
Andrew Tridgell [Fri, 11 Feb 2005 10:37:59 +0000 (10:37 +0000)]
r5333: weird, w2k3 always sends a positive name release response, even for names that
have never been registered. I wonder if there is some reason?
(This used to be commit dbef4fd5c3ae06e22fa6120a57edc0d2988a49a1)

13 years agor5330: Remove #include <sys/time.h> from includes.h.
Andrew Bartlett [Fri, 11 Feb 2005 10:15:56 +0000 (10:15 +0000)]
r5330: Remove #include <sys/time.h> from includes.h.

Add #include "system/time.h" back (it was removed in some of these
places because the definitions were provided by <sys/time.h> on tridge's
platform.)

Andrew Bartlett
(This used to be commit 34b1da730304bed7fee5bae7cbde7fbccecb6af5)

13 years agor5329: made the nbt server case sensitive
Andrew Tridgell [Fri, 11 Feb 2005 08:18:55 +0000 (08:18 +0000)]
r5329: made the nbt server case sensitive
(This used to be commit 895071881920a5d6726f377f4367b588deabfb03)

13 years agor5328: - allow case sensitive nbt name lookups
Andrew Tridgell [Fri, 11 Feb 2005 07:54:20 +0000 (07:54 +0000)]
r5328:  - allow case sensitive nbt name lookups

 - added --case-sensitive option to nmblookup

 - added case sensitivity tests to the NBT-WINS test
(This used to be commit 80a95d5688e055b36727e5c043cb36322d719763)

13 years agor5326: removed the charset conversion from the nbtname code, so we no longer
Andrew Tridgell [Fri, 11 Feb 2005 07:20:16 +0000 (07:20 +0000)]
r5326: removed the charset conversion from the nbtname code, so we no longer
convert from/to DOS strings in NBT names. This will allow us to
support all foreign names as a WINS server, as long as they don't
contain a 0 byte.
(This used to be commit 8e5d3a74d341de086d850d823cf8a1bfc9387fe8)

13 years agor5325: - expanded the NBT-WINS test to include scopes
Andrew Tridgell [Fri, 11 Feb 2005 06:58:07 +0000 (06:58 +0000)]
r5325: - expanded the NBT-WINS test to include scopes

- fixed the bugs that the new test found
(This used to be commit 6d775f12168d51ce92a3f7e17f4bf06357d41a06)

13 years agor5322: removed a whole bunch of #include lines that minimal_includes.pl
Andrew Tridgell [Fri, 11 Feb 2005 02:08:39 +0000 (02:08 +0000)]
r5322: removed a whole bunch of #include lines that minimal_includes.pl
thinks are not needed. Now to see how this fares on the build farm :)
(This used to be commit 80ffcc650c9c86141507edd8338b97814a85f868)

13 years agor5321: added a program that works out the minimal set of #include lines
Andrew Tridgell [Fri, 11 Feb 2005 02:07:41 +0000 (02:07 +0000)]
r5321: added a program that works out the minimal set of #include lines
needed for a C file in Samba. It tries compiling without each #include
line in turn, and looks for any changes in the compiler output.

Note that the output is not guaranteed correct, it might be that an
include is needed onlyu on some platforms. To cope with this, it
doesn't consider lines with the word "needed" on them. So add a
comment like this:

#include "foo.h" /* needed by systems without kerberos */

and it will know to skip it

It also skips any include lines in a #if section.

If you are brave, you can give it the option --remove and it will
remove lines it thinks are not needed. Please review carefully before
committing the results, and watch the build farm for breakage.
(This used to be commit 348a5f1d4d272fffaad7680c8d24ef59829dbea2)

13 years agor5320: Treat structs and unions somewhat more similarly:
Jelmer Vernooij [Fri, 11 Feb 2005 02:05:47 +0000 (02:05 +0000)]
r5320: Treat structs and unions somewhat more similarly:
 - use same names in hashes (DATA -> ELEMENTS, etc)
 - [case()] and [default] are no longer special case, they're just regular properties
(This used to be commit 6a0f599f822f5c42d93e78c13765804ab2223968)

13 years agor5319: Make some more alignment code generic, move NDR-specific stuff to
Jelmer Vernooij [Thu, 10 Feb 2005 23:34:59 +0000 (23:34 +0000)]
r5319: Make some more alignment code generic, move NDR-specific stuff to
parser.pm (now renamed to ndr.pm).
(This used to be commit a469a5fefb4e6941264c11f4bde60eab71f6f7aa)

13 years agor5310: allow for rounding errors in the sleep test
Andrew Tridgell [Thu, 10 Feb 2005 07:57:09 +0000 (07:57 +0000)]
r5310: allow for rounding errors in the sleep test
(This used to be commit bd2c55a5193b29b28c4fbde643c302f0d81c95a6)

13 years agor5309: removed ads.h from includes.h
Andrew Tridgell [Thu, 10 Feb 2005 07:43:39 +0000 (07:43 +0000)]
r5309: removed ads.h from includes.h
(This used to be commit 196c45b834c39f293b9533cec5cfe5a77382d4e2)

13 years agor5308: trimmed back a lot of the old macros from smb_macros.h
Andrew Tridgell [Thu, 10 Feb 2005 07:39:14 +0000 (07:39 +0000)]
r5308: trimmed back a lot of the old macros from smb_macros.h
(This used to be commit bf43c9bdcf9e654d123f6a2b29feb9189ca9e561)

13 years agor5307: removed db_wrap.h from includes.h
Andrew Tridgell [Thu, 10 Feb 2005 07:22:25 +0000 (07:22 +0000)]
r5307: removed db_wrap.h from includes.h
(This used to be commit 826baec7b348814a7bbdcdbec8c8526514f25da1)

13 years agor5306: removed all the unused mutex functions from mutex.c. When (if?) we
Andrew Tridgell [Thu, 10 Feb 2005 07:18:00 +0000 (07:18 +0000)]
r5306: removed all the unused mutex functions from mutex.c. When (if?) we
decide to reinstate the mutex code for the threads process model, I'd
like to do it a little differently. At least this gets it out of
includes.h for now.
(This used to be commit cfee0fb02e10add22b6c436bdfa95d1a8f5f3def)

13 years agor5305: removed libcli/ldap/ldap.h from includes.h
Andrew Tridgell [Thu, 10 Feb 2005 07:08:40 +0000 (07:08 +0000)]
r5305: removed libcli/ldap/ldap.h from includes.h
(This used to be commit 0df3fdd8178085c40f9cd776cc3e1486ca559c8e)

13 years agor5304: removed lib/socket/socket.h from includes.h
Andrew Tridgell [Thu, 10 Feb 2005 06:59:29 +0000 (06:59 +0000)]
r5304: removed lib/socket/socket.h from includes.h
(This used to be commit b902ea546d2d1327b23f40ddaeeaa8e7e3662454)

13 years agor5303: fixed build of gconf registry backend
Andrew Tridgell [Thu, 10 Feb 2005 06:45:13 +0000 (06:45 +0000)]
r5303: fixed build of gconf registry backend
(This used to be commit b4993c738ba7ce38de4eaf6270db60f8cd551cdd)

13 years agor5302: fixed a compilation problem on solaris caused by the recent include
Andrew Tridgell [Thu, 10 Feb 2005 06:36:30 +0000 (06:36 +0000)]
r5302: fixed a compilation problem on solaris caused by the recent include
changes
(This used to be commit e7e015f79b10c353848a17f31c91a0593790a560)

13 years agor5301: fixed pthreads build
Andrew Tridgell [Thu, 10 Feb 2005 05:29:38 +0000 (05:29 +0000)]
r5301: fixed pthreads build
(This used to be commit a7a72de07b3197b2ebfe8fe33a4e017e384dec6f)

13 years agor5300: more uint32 and system/filesys.h build fixes when developer mode is enabled
Andrew Tridgell [Thu, 10 Feb 2005 05:22:53 +0000 (05:22 +0000)]
r5300: more uint32 and system/filesys.h build fixes when developer mode is enabled
(This used to be commit 93931b1a741a3722c311ada80c4c9d3d670f91b2)

13 years agor5299: fixed an include ordering problem
Andrew Tridgell [Thu, 10 Feb 2005 05:15:37 +0000 (05:15 +0000)]
r5299: fixed an include ordering problem
(This used to be commit 483b7af1fd6e3caa1db2f6b31ac6165d29ea7512)

13 years agor5298: - got rid of pstring.h from includes.h. This at least makes it a bit
Andrew Tridgell [Thu, 10 Feb 2005 05:09:35 +0000 (05:09 +0000)]
r5298:  - got rid of pstring.h from includes.h. This at least makes it a bit
   less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
(This used to be commit 9db6c79e902ec538108d6b7d3324039aabe1704f)

13 years agor5297: ensure pstring is not in the generated prototypes
Andrew Tridgell [Thu, 10 Feb 2005 05:06:41 +0000 (05:06 +0000)]
r5297: ensure pstring is not in the generated prototypes
(This used to be commit b4103d9f2b809408572521f385d4e7a5ba412169)

13 years agor5296: - only include the tdb headers where they are needed
Andrew Tridgell [Thu, 10 Feb 2005 03:48:43 +0000 (03:48 +0000)]
r5296: - only include the tdb headers where they are needed

- removed the u32 hack in events.c as I think this was only needed as
  tdb.h defines u32. Metze, can you check that this hack is indeed no
  longer needed on your suse system?
(This used to be commit 6f79432fe656164d4770dbce114a30dda5e7bf9a)

13 years agor5294: - added a separate NBT-WINS test for WINS operations (register, refresh, relea...
Andrew Tridgell [Thu, 10 Feb 2005 03:22:47 +0000 (03:22 +0000)]
r5294: - added a separate NBT-WINS test for WINS operations (register, refresh, release and query)

- change the iface_n_*() functions to return a "const char *" instead of a "struct ipv4_addr"
  I think that in general we should move towards "const char *" for
  all IP addresses, as this makes IPv6 much easier, and is also easier
  to debug. Andrew, when you get a chance, could you fix some of the
  auth code to use strings for IPs ?

- return a NTSTATUS error on bad name queries and node status instead
  of using rcode. This makes the calling code simpler.

- added low level name release code in libcli/nbt/

- use a real IP in the register and wins nbt torture tests, as w2k3
  WINS server silently rejects some operations that don't come from the
  IP being used (eg. it says "yes" to a release, but does not in fact
  release the name)
(This used to be commit bb1ab11d8e0ea0bd9ae34aebeb565d36fe4b495f)

13 years agor5293: Map an empty policy handle to None when creating policy handles, and
Tim Potter [Thu, 10 Feb 2005 03:19:21 +0000 (03:19 +0000)]
r5293: Map an empty policy handle to None when creating policy handles, and
refuse to accept None as a policy handle when accepting them.  Now we
don't segfault after running the samr_Shutdown() test.
(This used to be commit 2f0419c4d8100864ddddf5629d1808b655da9d76)

13 years agor5292: ensure we cleanup the epoll_fd on event context destruction
Andrew Tridgell [Thu, 10 Feb 2005 03:16:33 +0000 (03:16 +0000)]
r5292: ensure we cleanup the epoll_fd on event context destruction
(This used to be commit e820fca5062026810c5bd4827941f34c19a5e847)

13 years agor5291: fixed ncacn_ip_tcp against windows
Andrew Tridgell [Thu, 10 Feb 2005 01:19:26 +0000 (01:19 +0000)]
r5291: fixed ncacn_ip_tcp against windows
(This used to be commit 8df8308f7f7c937ea8bcbb4336e98911824ece48)

13 years agor5288: Make alignment code more generic
Jelmer Vernooij [Wed, 9 Feb 2005 21:53:25 +0000 (21:53 +0000)]
r5288: Make alignment code more generic
(This used to be commit 5c2f0df566804cf0b8879504f5e41a8100a7fd40)

13 years agor5286: Some first steps in making the pidl code somewhat more generic for the
Jelmer Vernooij [Wed, 9 Feb 2005 21:10:23 +0000 (21:10 +0000)]
r5286: Some first steps in making the pidl code somewhat more generic for the
various data types:

Add ndr_flags argument to all ndr push/pull scalar functions
(This used to be commit ab490c0c882bb13de190546c50a0631ecb8255ad)

13 years agor5285: add a generic dlist_item struct which has a void *ptr for the data
Stefan Metzmacher [Wed, 9 Feb 2005 17:29:09 +0000 (17:29 +0000)]
r5285: add a generic dlist_item struct which has a void *ptr for the data

metze
(This used to be commit 7dbd9e7aab0720c76561b4c9a2d38b82b3a8bfe4)

13 years agor5284: this is needed on my server
Stefan Metzmacher [Wed, 9 Feb 2005 13:51:14 +0000 (13:51 +0000)]
r5284: this is needed on my server

+/* this #undef is needed on my SuSE 9.2 Box with glibc-devel-2.3.3-118 */
+#undef u32

as sys/epoll.h has this:
typedef union epoll_data
{
  void *ptr;
  int fd;
  uint32_t u32;
  uint64_t u64;
} epoll_data_t;

metze
(This used to be commit b4928f3ea8f6530317dfa76593cf93e6acd4337a)

13 years agor5282: merging autogen fixes from 3_0
Gerald Carter [Tue, 8 Feb 2005 22:55:24 +0000 (22:55 +0000)]
r5282: merging autogen fixes from 3_0
(This used to be commit ece7a3918ec33b4b8b61b50277c5a1e484c55e3b)

13 years agor5277: initialise the multi_homed flag in the name registration test
Andrew Tridgell [Tue, 8 Feb 2005 01:10:34 +0000 (01:10 +0000)]
r5277: initialise the multi_homed flag in the name registration test
(This used to be commit d51fcee29a8d8bf253b3a6d0b7b741f9b55af94a)

13 years agor5276: - added support for NBT_OPCODE_REFRESH2 (type 0x9)
Andrew Tridgell [Tue, 8 Feb 2005 01:09:21 +0000 (01:09 +0000)]
r5276: - added support for NBT_OPCODE_REFRESH2 (type 0x9)

- when registering with a WINS server, initially use multi-homed
  registration, then switch to name refresh requests. Send refresh
  requests only to the WINS server that responded to our
  registration. If that server goes away, then start the registration
  from scratch. This makes registration more robust to WINS server
  failure.

- send WINS registration requests out on our first interface rather
  than an unbound interface, to avoid the problem of WACK replies
  being sent to the wrong port (w2k3 WINS server does this)
(This used to be commit f7712ac7468184c07b3e3c10cb7b847ad1791dd2)

13 years agor5275: - added support for NBT_OPCODE_MULTI_HOME_REG (opcode 0xf) for WINS name regis...
Andrew Tridgell [Tue, 8 Feb 2005 01:05:41 +0000 (01:05 +0000)]
r5275: - added support for NBT_OPCODE_MULTI_HOME_REG (opcode 0xf) for WINS name registrations

- fixed a bug in the send queue handling on timeouts

- added support for handling unexpected replies (replies to the wrong
  port) at the nbtsocket layer

- added separate layer 2 code for wins refresh and wins registration
(This used to be commit 2502b02898407e3262c09a5a4aa573c5f87b8f5f)

13 years agor5274: fixed some const warnings by making the str_list_ functions return "const...
Andrew Tridgell [Tue, 8 Feb 2005 01:02:56 +0000 (01:02 +0000)]
r5274: fixed some const warnings by making the str_list_ functions return "const char **"
(This used to be commit 4165f2163530c7d2ffbea2922fbfe942eee85e7a)

13 years agor5273: fixed another bug in the code that keeps timed events
Andrew Tridgell [Tue, 8 Feb 2005 01:01:22 +0000 (01:01 +0000)]
r5273: fixed another bug in the code that keeps timed events
sorted. Hopefully it really works now :-)
(This used to be commit 34e1a3ad7849df913584074ec406c2fcc40212fc)

13 years agor5266: This is a nice typo ;-)
Günther Deschner [Mon, 7 Feb 2005 22:02:05 +0000 (22:02 +0000)]
r5266: This is a nice typo ;-)

Guenther
(This used to be commit 77b99c03b85827a1e70b0de41c8070e38af27374)

13 years agor5261: translate nbt rcode errors to NTSTATUS codes
Andrew Tridgell [Mon, 7 Feb 2005 12:10:38 +0000 (12:10 +0000)]
r5261: translate nbt rcode errors to NTSTATUS codes
(This used to be commit 554d1b70e73faeb1f5ecf88f31c5810d86d76200)

13 years agor5260: - show an error message on nmblookup failure
Andrew Tridgell [Mon, 7 Feb 2005 11:56:34 +0000 (11:56 +0000)]
r5260: - show an error message on nmblookup failure

- always try to enable broadcast on nbt name sockets (this matches
  samba3 behaviour better)
(This used to be commit 919bc14e7bbc04479cf11f7a7fd4c5e46616ef46)

13 years agor5259: make sure we give the ip of the interface that a name query comes in
Andrew Tridgell [Mon, 7 Feb 2005 11:49:55 +0000 (11:49 +0000)]
r5259: make sure we give the ip of the interface that a name query comes in
on as the first IP in a multi-homed reply
(This used to be commit a9128f6544d56a637e28430cbd2907acbb978281)

13 years agor5256: More verbose description of functions (as I learn the code).
Rafal Szczesniak [Sun, 6 Feb 2005 23:06:27 +0000 (23:06 +0000)]
r5256: More verbose description of functions (as I learn the code).

rafal
(This used to be commit 38ac6b8d570fa02bc32899521d42ba7237f77024)

13 years agor5253: need to pre-declare some structures
Andrew Tridgell [Sun, 6 Feb 2005 08:33:22 +0000 (08:33 +0000)]
r5253: need to pre-declare some structures
(This used to be commit a4d44d4a9d7cf51a9a4e47dce8e603ba22324d99)

13 years agor5252: - fixed nmblookup for the nbt api changes
Andrew Tridgell [Sun, 6 Feb 2005 08:27:12 +0000 (08:27 +0000)]
r5252: - fixed nmblookup for the nbt api changes

- added a simple WINS server name registration and query test
(This used to be commit d56e68ebf584e50aa409d22b1ca7c9276abea962)

13 years agor5251: - renamed the nbtd server side structures to have a nbtd_ prefix, to
Andrew Tridgell [Sun, 6 Feb 2005 08:25:53 +0000 (08:25 +0000)]
r5251: - renamed the nbtd server side structures to have a nbtd_ prefix, to
  be consistent with the function names

- added WINS client support to the NBT server. It will do initial WINS
  registration, and WINS refresh, automatically failing over to
  secondary WINS servers and handling multi-homed servers where we need
  to register multiple IPs.

- added support for multi-homed name query replies, which are
  essential for multi-homed registration as the WINS server will query
  us to ensure we have the names when doing the secondary IPs in
  multi-homed registration
(This used to be commit a1553fa8054dc7d33f5d77f8f95d3ffd90392b2a)

13 years agor5250: - added low level support for retrying nbt name queries, rather than
Andrew Tridgell [Sun, 6 Feb 2005 08:22:18 +0000 (08:22 +0000)]
r5250: - added low level support for retrying nbt name queries, rather than
  having the 2nd layer functions do retries themselves. This makes the
  code simpler, and allows the TRN_ID to be reused in the retry (which
  is how it is supposed to work).

- added support for WACK replies to nbt name requests. A WACK reply
  specifies a timeout to wait for the real reply.

- added WINS name refresh async calls, supporting multiple wins
  servers and multiple IPs to register
(This used to be commit 76be35cb990de830c2451d9e48cb2c40a4befdb7)

13 years agor5249: don't include ';' in the default list separators for parsing
Andrew Tridgell [Sun, 6 Feb 2005 08:16:18 +0000 (08:16 +0000)]
r5249: don't include ';' in the default list separators for parsing
smb.conf. It was rarely (if ever?) used, and poses problems as it is
not multi-byte safe for character searches
(This used to be commit 75a6cfb2f6b4ef85cf7e49958cccae9d35c4e5a2)

13 years agor5248: fixed a silly bug in DLIST_ADD_AFTER()
Andrew Tridgell [Sun, 6 Feb 2005 08:14:44 +0000 (08:14 +0000)]
r5248: fixed a silly bug in DLIST_ADD_AFTER()
(This used to be commit e36b6882fdd1bb331f297b3b82bc3621b8ba0586)

13 years agor5247: Fix rpcclient to work with new swig interface.
Tim Potter [Sun, 6 Feb 2005 04:34:29 +0000 (04:34 +0000)]
r5247: Fix rpcclient to work with new swig interface.
(This used to be commit ad12a90d0e0fe7106b1845097d8fc71be3b8e378)

13 years agor5245: Remove dead code.
Tim Potter [Sun, 6 Feb 2005 00:50:55 +0000 (00:50 +0000)]
r5245: Remove dead code.
(This used to be commit 949f31ad2865699da0f3a9e827606abd762b10b7)

13 years agor5244: Convert this module to use the new structure mapping SWIG stuff instead of
Tim Potter [Sun, 6 Feb 2005 00:38:10 +0000 (00:38 +0000)]
r5244: Convert this module to use the new structure mapping SWIG stuff instead of
the old dictionary based routines.  The SAMR connect, close, enumdomains,
opendomain, enum{users,aliases,groups} functions now work again!
(This used to be commit 53b361657fe892ad7b9d781450ad841a6b1072e5)

13 years agor5243: Woohoo - memory leak city! Comment out talloc_free() call until I
Tim Potter [Sun, 6 Feb 2005 00:35:58 +0000 (00:35 +0000)]
r5243: Woohoo - memory leak city!  Comment out talloc_free() call until I
figure out a better way to pass tallocated memory around with SWIG.
(This used to be commit c63668cbbe393a78ccd9a86a33fb4bd7bb9af16d)

13 years agor5242: Check that argument is an integer or a long for uint32_t input
Tim Potter [Sun, 6 Feb 2005 00:34:44 +0000 (00:34 +0000)]
r5242: Check that argument is an integer or a long for uint32_t input
typemap.

The uint32_t output typemap must return a Python long as an unsigned
uint32_t cannot be fully represented by a Python int.

Likewise for the NTSTATUS typemap.
(This used to be commit 6dba5d6fb43f87bedc380c4f82b1d5f90b70325a)

13 years agor5241: Generate swig wrappers for unions as well as structures.
Tim Potter [Sun, 6 Feb 2005 00:18:46 +0000 (00:18 +0000)]
r5241: Generate swig wrappers for unions as well as structures.
(This used to be commit e65741159d8578d629ccfcd863f034fda895f9fe)

13 years agor5240: Don't return WERR_OK when no values were found (reported by Matt Cobb)
Jelmer Vernooij [Sat, 5 Feb 2005 23:10:31 +0000 (23:10 +0000)]
r5240: Don't return WERR_OK when no values were found (reported by Matt Cobb)
(This used to be commit f2e6d71584672e9bf0eaa7176d76781a30d317d1)

13 years agor5237: Add error code for "class not registered"
Jelmer Vernooij [Sat, 5 Feb 2005 14:40:47 +0000 (14:40 +0000)]
r5237: Add error code for "class not registered"
(This used to be commit b72a0ac654857273eaaf3c5e32d86abed0af3ceb)

13 years agor5224: Add in/out typemaps for resume handles. This saves us having to much
Tim Potter [Fri, 4 Feb 2005 06:35:45 +0000 (06:35 +0000)]
r5224: Add in/out typemaps for resume handles.  This saves us having to much
around with pointers to just one uint32.

Add an output typemap to copy a policy handle as the talloc context is
destroyed before the wrapper function returns.  More work here needed
to avoid memory leaks.

Use the swig carrays.i file to create accessor and setter functions
for fixed width integer types.  Also add functions for struct samr_SamEntry
as it's returned by the LookupDomain RPC.  This really needs to be
done by pidl so I don't have to go through and find all the structures
that are returned in arrays.

Include security.i to give us SIDs and security descriptors.
(This used to be commit 5a1f6c999ef5e84e93ec8f07b9751d795c4566a5)

13 years agor5223: Rename dom_sid2 to dom_sid as we don't care about the difference
Tim Potter [Fri, 4 Feb 2005 06:28:50 +0000 (06:28 +0000)]
r5223: Rename dom_sid2 to dom_sid as we don't care about the difference
for the swig wrappers.
(This used to be commit edb32b9b5175f720bce110bf2bb4cf136ed47142)

13 years agor5222: made the nbtd_self_packet() code more efficient
Andrew Tridgell [Fri, 4 Feb 2005 05:13:46 +0000 (05:13 +0000)]
r5222: made the nbtd_self_packet() code more efficient
(This used to be commit 8fe477955d0e28c891281803d625d80cb78a51b0)

13 years agor5221: replace the str_list_*() code with new code based on talloc(). This is
Andrew Tridgell [Fri, 4 Feb 2005 04:58:48 +0000 (04:58 +0000)]
r5221: replace the str_list_*() code with new code based on talloc(). This is
a precursor to adding the wins client code in the nbt server.
(This used to be commit e8e499755ab667015740b35a7787134ebe852954)

13 years agor5217: avoid epoll_ctl() if the event flags are already set correctly
Andrew Tridgell [Fri, 4 Feb 2005 02:35:13 +0000 (02:35 +0000)]
r5217: avoid epoll_ctl() if the event flags are already set correctly
(This used to be commit d89b493aaf690ceb107bd62df75f1bba82284f90)

13 years agor5216: don't defend group names against incoming name registration requests
Andrew Tridgell [Fri, 4 Feb 2005 02:31:04 +0000 (02:31 +0000)]
r5216: don't defend group names against incoming name registration requests
(This used to be commit c5f5e1d4012c9f4fd4ea78a4276e6766727a5494)

13 years agor5215: register aliases as both client and server node types, so nmblookup can see...
Andrew Tridgell [Fri, 4 Feb 2005 02:22:01 +0000 (02:22 +0000)]
r5215: register aliases as both client and server node types, so nmblookup can see them
(This used to be commit 3e9788691fe6d618b1e170494e818d0cbdc64eae)

13 years agor5214: added support for "netbios aliases" in smb.conf
Andrew Tridgell [Fri, 4 Feb 2005 02:20:55 +0000 (02:20 +0000)]
r5214: added support for "netbios aliases" in smb.conf
(This used to be commit 3270b07539d9a50763f4f15c7aa8fee028928b29)

13 years agor5213: do our name broadcast refresh requests as register packets not refresh
Andrew Tridgell [Fri, 4 Feb 2005 02:16:59 +0000 (02:16 +0000)]
r5213: do our name broadcast refresh requests as register packets not refresh
packets, as w2k3 and Samba3 do not defend against broadcast name
refresh packets
(This used to be commit 3935b5f7c57be46042110911ba5b00ac39b0f41a)

13 years agor5212: added checking for receiving our own packets as broadcasts
Andrew Tridgell [Fri, 4 Feb 2005 02:05:27 +0000 (02:05 +0000)]
r5212: added checking for receiving our own packets as broadcasts
(This used to be commit 290dbd8cdcfa6a897647768dcbbd03f22fc7cf36)

13 years agor5211: added broadcast name defense against both registration and refresh
Andrew Tridgell [Fri, 4 Feb 2005 01:55:50 +0000 (01:55 +0000)]
r5211: added broadcast name defense against both registration and refresh
requests
(This used to be commit 9eafe2cacaef64384febe6bb0938294f7c1ee6bf)

13 years agor5210: changed server side nbt functions to be prefixed with nbtd_ instead of
Andrew Tridgell [Fri, 4 Feb 2005 01:39:10 +0000 (01:39 +0000)]
r5210: changed server side nbt functions to be prefixed with nbtd_ instead of
nbt_, so as to more clearly separate them from the client code in
libcli/nbt/
(This used to be commit b07a7e35f26204055a99abf72438b5cd7ec35d3b)

13 years agor5209: Fix the endpoint mapper to work with IPX endpoints (which
Jelmer Vernooij [Fri, 4 Feb 2005 01:32:19 +0000 (01:32 +0000)]
r5209: Fix the endpoint mapper to work with IPX endpoints (which
accidently have the same protocol id as UUID's)
Before this, Samba would give NDR errors when contacting
a remote server that has IPX support enabled.

This one was on my long due bugs list.
(This used to be commit 7b847de64f35b8e897b64ad047d8aea3813214f8)

13 years agor5199: fix some minor configure bugs
Stefan Metzmacher [Thu, 3 Feb 2005 13:00:16 +0000 (13:00 +0000)]
r5199: fix some minor configure bugs

metze
(This used to be commit 274ef2a206aa00b3155adc27f5b7e35d3fa52bf6)

13 years agor5198: don't consider failure to remove an epoll event as enough reason to
Andrew Tridgell [Thu, 3 Feb 2005 12:26:28 +0000 (12:26 +0000)]
r5198: don't consider failure to remove an epoll event as enough reason to
fallback to select(). This can happen in too many situations.
(This used to be commit 2d7242f2ec945c1e5fbc6f256265471f60ac8cd9)

13 years agor5197: moved events code to lib/events/ (suggestion from metze)
Andrew Tridgell [Thu, 3 Feb 2005 11:56:03 +0000 (11:56 +0000)]
r5197: moved events code to lib/events/ (suggestion from metze)
(This used to be commit 7f54c8a339f36aa43c9340be70ab7f0067593ef2)

13 years agor5196: fixed sily bug (that metze found)
Andrew Tridgell [Thu, 3 Feb 2005 11:30:36 +0000 (11:30 +0000)]
r5196: fixed sily bug (that metze found)
(This used to be commit 180f29f9e05e75e8ed32d010bc0c57a55ea9d843)

13 years agor5195: most events don't need the time of the event, so save a gettimeofday() call
Andrew Tridgell [Thu, 3 Feb 2005 11:25:52 +0000 (11:25 +0000)]
r5195: most events don't need the time of the event, so save a gettimeofday() call
and just use timeval_current() when its actually needed
(This used to be commit 236403cc4dc2924ed6a898acae0bb44cc1688dcc)

13 years agor5194: added support for using epoll instead of select() on systems that have
Andrew Tridgell [Thu, 3 Feb 2005 08:24:08 +0000 (08:24 +0000)]
r5194: added support for using epoll instead of select() on systems that have
it. epoll is much more scalable than select(), but only exists on some
systems (such as Linux with the 2.6.x kernel). The code detects any
epoll system call failures at runtime and falls back to select() if
there is a problem, so it should be safe to compile this on a 2.6
kernel and run it on a 2.4.x kernel.

The speedup is quite large. It gains 20% in packet rate in the
BENCH-NBT test, on top of another 20% gain from the better timer
handling I added earlier. The really big gain will be when we are
dealing with large numbers of file descriptors. With epoll we can
handle hundreds of file descriptors all O(1), whereas with select it
is O(n).
(This used to be commit 26aa1aa69377e43da2942a42d137b95801e9fa1a)

13 years agor5193: make sure we mark the event dead when we free it on a dead connection
Andrew Tridgell [Thu, 3 Feb 2005 08:20:31 +0000 (08:20 +0000)]
r5193: make sure we mark the event dead when we free it on a dead connection
(This used to be commit 90535bab957ddaa7bfcdf43e199581f3352bdc8a)

13 years agor5190: Grr - typo.
Tim Potter [Thu, 3 Feb 2005 04:22:37 +0000 (04:22 +0000)]
r5190: Grr - typo.
(This used to be commit 5f40ff0f554323ed0a806be7a4d0f1fac97e3ffb)

13 years agor5189: fixed a double free bug in the ltdb indexing code
Andrew Tridgell [Thu, 3 Feb 2005 04:03:28 +0000 (04:03 +0000)]
r5189: fixed a double free bug in the ltdb indexing code
(This used to be commit 7be0bc93bd6757e52fd10bd3d3b3d1a8f5221452)