1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

718 Commits

Author SHA1 Message Date
Jelmer Vernooij
4abb479761 r10588: Remove more unused files, macros
(This used to be commit d2f80c0457)
2007-10-10 13:39:08 -05:00
Jelmer Vernooij
dc67354579 r10587: Remove unused constants
(This used to be commit b65c9dc607)
2007-10-10 13:39:08 -05:00
Jelmer Vernooij
42b81d7c3e r10528: Add credentials.h back into includes.h as some compilers don't
seem to be able to handle incomplete enum types.
(This used to be commit 540155fad3)
2007-10-10 13:39:02 -05:00
Andrew Tridgell
675f81eed3 r10525: change from AC_CHECK_TYPES() to AC_CHECK_TYPE() for intptr_t, so the
type is always available, which means we need less #ifdefs
(This used to be commit d4af4b11ae)
2007-10-10 13:39:01 -05:00
Jelmer Vernooij
49839f356f r10513: Reduce some use of pstring. The main reason some parts of the code still
use pstring is next_token() now.
(This used to be commit a5b88bcd42)
2007-10-10 13:38:58 -05:00
Jelmer Vernooij
f801ad3592 r10510: Decrease the amount of data included by includes.h a bit
(This used to be commit 03647e1321)
2007-10-10 13:38:58 -05:00
Volker Lendecke
9593101ec1 r10491: First step towards wbinfo -t: This issues a name request for the primary
domain and gets the DC's name via a mailslot call.

Metze, I renamed wbsrv_queue_reply to wbsrv_send_reply in accordance with
irpc_send_reply. Having _queue_ here and _send_ there is a bit confusing. And
as everything is async anyway, the semantics should not be too much of a
problem.

Volker
(This used to be commit 4637964b19)
2007-10-10 13:38:54 -05:00
Jelmer Vernooij
f3b412fbd6 r10438: Move portability functions to lib/replace/; replace now simply ensures
that a given set of (working) POSIX functions are available (without
prefixes to their names, etc). See lib/replace/README for a list.

Functions that behave different from their POSIX specification
(such as sys_select, sys_read, etc) have kept the sys_ prefix.
(This used to be commit 29919a7105)
2007-10-10 13:38:45 -05:00
Stefan Metzmacher
bcf0615be5 r10426: - restructure the winbind server code a bit
- remove the echo test stuff
- abstract out the used protocol
- we have a seperate handler for the samba3 protocol now
- the backend can easy do async replies
  by setting WBSRV_CALL_FLAGS_REPLY_ASYNC in wbsrv_call
  and then call wbsrv_queue_reply() later

metze
(This used to be commit 32f3e68a56)
2007-10-10 13:38:44 -05:00
Jelmer Vernooij
349294d358 r10315: Remove use of fstring and pstring in dynconfig.c
Remove unused includes of dynconfig.h
(This used to be commit 59083b7ba6)
2007-10-10 13:38:17 -05:00
Stefan Metzmacher
a8ec371a61 r10078: - add a 'struct data_blob_list_item'
- use this for the send_queue's of the different stream_servers
  to not redefine the same struct so often, and it maybe will be used
  in other places too

metze
(This used to be commit b6694f067a)
2007-10-10 13:37:51 -05:00
Andrew Bartlett
9b8b2bb094 r10044: Microsoft has defined this bit:
support.microsoft.com/?kbid=832572

(It inhbits the generation of a PAC).

Andrew Bartlett
(This used to be commit 330f351085)
2007-10-10 13:36:32 -05:00
Jelmer Vernooij
ff7342a4ad r10026: Move registry header file to lib/registry
Add support for showing security descriptor in regshell
Add support for saving files in NT4 registry backend
(This used to be commit 47cecd4726)
2007-10-10 13:36:30 -05:00
Jelmer Vernooij
40cbd4625a r10015: Change the NT4 registry backend to use the IDL-generate parse functions.
(This used to be commit 0ad46ef804)
2007-10-10 13:36:29 -05:00
Jelmer Vernooij
02b3abec25 r10007: Merge data_blk and data_len member of registry_value into a DATA_BLOB.
Fix handling of REG_DWORD in the LDB backend.
Fix a couple of warnings
(This used to be commit 709fdc7ebf)
2007-10-10 13:36:28 -05:00
Jelmer Vernooij
a3a7881d39 r9798: Add generic functions for handling smb.conf files (the parameters don't to be pre-declared). Also doesn't use any globals, so multiple files can be loaded at once.
Currently uses the prefix "param" for all functions and structures; suggestions for better ones are welcome...

Remove old smb.conf-parsing code from libsamba3.
(This used to be commit 414e5f7f6d)
2007-10-10 13:35:02 -05:00
Andrew Bartlett
24186a80eb r9728: A *major* update to the credentials system, to incorporate the
Kerberos CCACHE into the system.

This again allows the use of the system ccache when no username is
specified, and brings more code in common between gensec_krb5 and
gensec_gssapi.

It also has a side-effect that may (or may not) be expected: If there
is a ccache, even if it is not used (perhaps the remote server didn't
want kerberos), it will change the default username.

Andrew Bartlett
(This used to be commit 6202267f6e)
2007-10-10 13:34:54 -05:00
Jelmer Vernooij
95ed275dbb r9698: Fix a bit of memory management
More minor bugfixes
Support mapping objectclasses and do mapping on 'dn' field as well (not just msg->dn)
(This used to be commit b7b079167d)
2007-10-10 13:34:42 -05:00
Jelmer Vernooij
02779b745f r9672: Fix build for compilers that don't like undefined-length arrays at the end of structs...
(This used to be commit c2211df586)
2007-10-10 13:34:39 -05:00
Stefan Metzmacher
81021aaa95 r9638: add error code that you get when you call DsGetNCChanges() with a tmp_highest_usn which is
higher than the real highest of the source dsa

metze
(This used to be commit e4424d2a6d)
2007-10-10 13:34:36 -05:00
Jelmer Vernooij
dcd27d550f r9602: Add support for reading share_info.tdb and smb.conf.
Add userdata argument to function pointers for pm_process()
(This used to be commit 84b2fb3467)
2007-10-10 13:34:33 -05:00
Jelmer Vernooij
98b303e2eb r9595: Add ldb map module
(This used to be commit e0a0d3f092)
2007-10-10 13:34:33 -05:00
Jelmer Vernooij
cdf218e270 r9589: Support reading secrets tdb
(This used to be commit dd15131b52)
2007-10-10 13:34:32 -05:00
Jelmer Vernooij
ca71549d5a r9581: Registry db
(This used to be commit b264e9f56a)
2007-10-10 13:34:31 -05:00
Jelmer Vernooij
479ef0a387 r9557: Some more updates. Use combined function for parsing a set of
samba3 databases
(This used to be commit b91a695bd8)
2007-10-10 13:34:28 -05:00
Jelmer Vernooij
6622d3be09 r9556: Define a few libsamba structs
(This used to be commit 46c5cdb673)
2007-10-10 13:34:28 -05:00
Stefan Metzmacher
8385973935 r9518: - remove the subcontext_size() hack from rev 9509
as it isn't needed
- parse some more DsAddEntry() errors
- add some more attid constands so that all attribute that are needed
  for a DsAddEntry in the DC Domain Join are mapped
- add value() for __ndr_size, to more attribute container, so that the caller
  doesn't need to fill them in, that was the reason for getting an NDR_FAULT

metze
(This used to be commit a9a1a6f861)
2007-10-10 13:34:26 -05:00
Stefan Metzmacher
36dcb8425d r9514: add some new error codes I was getting with DsGetNCChanges() and DsAddEntry()
metze
(This used to be commit 2cbbb8ace2)
2007-10-10 13:34:25 -05:00
Stefan Metzmacher
54a703d433 r9509: start to fix the pushing of drsuapi_DsAttributeValueDNString structs,
this uses a trick with talloc_get_type() to workaround using [value()] vars
in [subcontext_size()]

metze
(This used to be commit 93065f2d34)
2007-10-10 13:34:24 -05:00
Andrew Tridgell
a92e61c452 r9503: removed duplicate REG_* defines from registry.h now that they are
generated in winreg.h
(This used to be commit fc15e1b003)
2007-10-10 13:34:23 -05:00
Jelmer Vernooij
7fca0f1b98 r9453: Add samba3_samaccount (fix the build)
(This used to be commit 65ddea09b9)
2007-10-10 13:34:17 -05:00
Simo Sorce
3e4c4cff21 r9391: Convert all the code to use struct ldb_dn to ohandle ldap like distinguished names
Provide more functions to handle DNs in this form
(This used to be commit 692e35b779)
2007-10-10 13:33:32 -05:00
Stefan Metzmacher
810dffecc2 r9371: add the usefull trick hack for NT_STATUS_NO_MEMORY too
metze
(This used to be commit 9b9635833f)
2007-10-10 13:33:29 -05:00
Andrew Bartlett
dcf88f58b4 r9085: Missing structs.h entry.
Andrew Bartlett
(This used to be commit 379bcf7061)
2007-10-10 13:31:15 -05:00
Andrew Tridgell
223262c11e r9048: added a new DOS error code (thanks to EMC)
(This used to be commit 1936c20939)
2007-10-10 13:31:11 -05:00
Jelmer Vernooij
f30eba5222 r8940: Add TDR (Trivial Data Representation). The aim is to use this later for
NBT/WINS/etc rather then having to depend on NDR.
(This used to be commit 5ee7af26dd)
2007-10-10 13:30:59 -05:00
Jelmer Vernooij
5e1a9fe62b r8933: Fix missing prototype warnings
(This used to be commit 39b2220a84)
2007-10-10 13:30:58 -05:00
Andrew Bartlett
6cec8025b0 r8847: Rework the Samba4 'net join' code. I'm trying to get this closer to
what WinXP does when joining an AD domain, but in the meantime this
removes the excess unions, and uses the LSA pipe in same way XP does.

Andrew Bartlett
(This used to be commit d2789c4260)
2007-10-10 13:30:11 -05:00
Jelmer Vernooij
5b94a9583f r8806: Move data representation-independent data into seperate header
(This used to be commit 26e1fdf630)
2007-10-10 13:30:06 -05:00
Andrew Bartlett
6d26a7114f r8752: With all the infrustructure done, details like a SamSync migration
into LDB are actually quite easy.

This brings us the users, and sets basic domain information.

You are expected to have provisioned with the settings for the target
domain, and have joined the domain as a BDC.  Then simply 'net
samsync'.

Now we just need to flesh out the delta types.

Andrew Bartlett
(This used to be commit 1e0f7792bb)
2007-10-10 13:30:02 -05:00
Andrew Bartlett
82f96542fa r8744: Split 'net samdump' out into a separate file
Work on the talloc memory tree, as I think talloc_reference and other
things were biting me.

Crush unions in the name of code reform. ;-)

Andrew Bartlett
(This used to be commit 2eadcf4669)
2007-10-10 13:30:01 -05:00
Tim Potter
a33c02612a r8713: Experiment to try and fix warnings on 64-bit machines without breaking
32-bit ones.  Yes, this weird looking macros are part of C99.
(This used to be commit 7b316f119b)
2007-10-10 13:29:57 -05:00
Rafal Szczesniak
6868795a39 r8692: Starting parts of code to provide user modify functionality.
It's more like a placeholder now, than a working code. Just don't
want to hang it around my laptop only.

rafal
(This used to be commit bee1c9ec2d)
2007-10-10 13:29:54 -05:00
Jelmer Vernooij
c84512f0e1 r8690: Code cleanups, improvements necessary for dependencies (not added yet)
(This used to be commit 7384b3c4a1)
2007-10-10 13:29:54 -05:00
Andrew Tridgell
c77f4a68c6 r8460: removed the unused function krb5_locate_kdc(). It causes a build failure on irix.
Andrew, if you planned on using this in the future then we can put it
back and work out how to make it portable
(This used to be commit eaa74913fe)
2007-10-10 13:23:05 -05:00
Andrew Tridgell
c4173f6725 r8458: next target is irix - this gets the socket wrapper code building
(This used to be commit 3d4a2221c3)
2007-10-10 13:23:05 -05:00
Jelmer Vernooij
2483f979d1 r8438: - More win32 portability fixes. Now fails on socketwrapper (because
unix domain sockets are not available on win32)
- Update howto
(This used to be commit c88ee6b61b)
2007-10-10 13:23:02 -05:00
Jelmer Vernooij
84db066207 r8434: Win32 portability updates from Steven Edwards <steven_ed4153@yahoo.com>:
- undefine anything in the win32 api or PSDK headers that Samba already defines
 - map BSD error codes to Winsock Error codes
(This used to be commit d2ea619125)
2007-10-10 13:23:02 -05:00
Andrew Tridgell
2ea372afd9 r8420: slowly getting my way through some more heimdal portability fixes
(This used to be commit 59c3de6ca8)
2007-10-10 13:23:01 -05:00
Andrew Tridgell
54ffd4fdbf r8313: moved PRINTF_ATTRIBUTE to replace.h to try to get irix building with heimdal
(This used to be commit 7d4e309f02)
2007-10-10 13:20:05 -05:00
Andrew Tridgell
76478d7eb1 r8306: some more heimdal configure checks
(This used to be commit 575413fc86)
2007-10-10 13:20:04 -05:00
Tim Potter
4109f7d069 r8288: The SMB_ASSERT_ARRAY macro isn't used anymore.
(This used to be commit aab24385ab)
2007-10-10 13:19:32 -05:00
Jeremy Allison
3de3d6a02d r8174: Check DOS error codes in torture chkpath test.
Jeremy.
(This used to be commit ff58ecad04)
2007-10-10 13:19:17 -05:00
Stefan Metzmacher
f1031746e5 r8164: - match the ordering w2k3 uses for the PAC_BUFFER:
LOGON_INFO
   LOGON_NAME
   SRV_CHECKSUM
   KDC_CHECKSUM

- w2k3 also don't use the groupmembership array with rids
  it uses the othersids array

metze
(This used to be commit 2286fad27d)
2007-10-10 13:19:16 -05:00
Andrew Bartlett
42bb490709 r8161: Update Samba4 for the new Heimdal update.
Andrew Bartlett
(This used to be commit 6a9b637327)
2007-10-10 13:19:16 -05:00
Stefan Metzmacher
148235a009 r8148: - make the PAC generation code a bit more readable and add some outof memory checks
- move to handmodified pull/push code for PAC_BUFFER
  to get the _ndr_size field and the subcontext size right

- after looking closely to the sample w2k3 PAC in our torture test (and some more in my archive)
  I found out that the first uint32 before the netr_SamInfo3 was also a pointer,
  (and we passed a NULL pointer there before, so I think that was the reason why the windows clients doesn't want our PAC)

  w2k3 uses this for unique pointers:

  ptr = ndr->ptr_count * 4;
  ptr |= 0x00020000;
  ndr->ptr_count;

- do one more pull/push round with the sample PAC

metze
(This used to be commit 0eee179415)
2007-10-10 13:19:13 -05:00
Rafal Szczesniak
242fe4d8b9 r8128: Janitor work...
rafal
(This used to be commit 9f0dfafcde)
2007-10-10 13:19:12 -05:00
Andrew Tridgell
54fba5b1b8 r8116: demonstrate a little trick that can be used to track down where an
error is coming from. In this case I needed to know where a
NT_STATUS_ACCESS_DENIED was being returned, which is a very common
error, but I needed to know which place in the code was giving it
(This used to be commit 692bb1c8a1)
2007-10-10 13:19:10 -05:00
Andrew Tridgell
934831686c r8115: added support for 2 more dos error codes found during testing
(This used to be commit 97cb705713)
2007-10-10 13:19:10 -05:00
Andrew Tridgell
67a777a0e5 r8113: this should fix the build on systems without heimdal
(This used to be commit 980c09cfca)
2007-10-10 13:19:09 -05:00
Andrew Tridgell
950f662484 r8111: fixed the client library to work against w2k3 with nt status codes
disabled. The main change is to turn off spnego, which cannot work at
all without nt status codes (w2k3 gives a ERRHRD:ERRgeneral error when
you try)

I also modified NT_STATUS_EQUAL() to allow for nt->dos code equality,
but only when nt status codes are disabled in smb.conf. That keeps all
the existing torture code working, while still allowing us to
correctly catch the cases where forced dos error codes are needed

The dos->ntstatus mapping table has been removed completely, as it
doesn't really make sense, is impossible to get right, and with the
new dos status handling isn't needed. When matching a nt status code
to a dos status code it makes far more sense to map from the nt code
to the dos code and compare, rather than the reverse, as the nt->dos
mapping is what windows has to do internally, so there really is a
valid mapping table.
(This used to be commit f21274e07b)
2007-10-10 13:19:09 -05:00
Andrew Tridgell
b3383236a2 r8106: the use of a static string for dos error codes was causing problems in
the torture code. To fix this, get rid of dos_errstr() and instead
move the strings into the nt_errstr() table, using cpp to generate the
strings
(This used to be commit 3136ad9634)
2007-10-10 13:19:08 -05:00
Rafal Szczesniak
90046a1de2 r8078: rpc connect function uses structure now.
rafal
(This used to be commit 34592b6a92)
2007-10-10 13:19:06 -05:00
Stefan Metzmacher
88df3c81ee r8050: - make use of more [value()] properties
- the out subcontext's need to have a fixed size of r->in.offered,
  to make windows clients happy

metze
(This used to be commit 054e1ca434)
2007-10-10 13:19:02 -05:00
Rafal Szczesniak
396074a7fc r7999: Fix lacking structure definition.
rafal
(This used to be commit 6886aefe4c)
2007-10-10 13:18:57 -05:00
Andrew Bartlett
f62a70fe54 r7988: Store the KVNO for the machine account, and set it up in the provision.
Andrew Bartlett
(This used to be commit 90e94a4630)
2007-10-10 13:18:56 -05:00
Andrew Bartlett
2d95bf6da6 r7971: structs.h update
(This used to be commit 31e7df1392)
2007-10-10 13:18:55 -05:00
Jelmer Vernooij
66a52992ff r7850: Support mkdir() with just one parameter. Patch from
Steven Edwards <steven_ed4153@yahoo.com>.

I've moved the Win32-specific tests to win32.m4 so it does not
make any of the POSIX configure stuff more complicated.
(This used to be commit bf85fdd015)
2007-10-10 13:18:42 -05:00
Rafal Szczesniak
52f072865d r7733: New io structure for name lookup function.
rafal
(This used to be commit 12b468417d)
2007-10-10 13:18:27 -05:00
Andrew Bartlett
5b19286df0 r7690: Move the NT hash generation into the credentials system, rather than
in all the callers.  This also allows us to be more flexible in the
type of password we store.

Andrew Bartlett
(This used to be commit 00b8588c68)
2007-10-10 13:18:23 -05:00
Andrew Bartlett
8a6b60e1e4 r7688: Fix the internal heimdal build - push one #define back to
heimdal_build/config.h

Andrew Bartlett
(This used to be commit 337cb20ac4)
2007-10-10 13:18:22 -05:00
Andrew Bartlett
dd39c8cedf r7683: The other file from the last commit. And it's include/system/kerberos.h that I'm putting the #defines in...
Andrew Bartlett
(This used to be commit 31f7ec38e6)
2007-10-10 13:18:22 -05:00
Andrew Bartlett
d2c2e0d3b7 r7681: This #define is unused.
Andrew Bartlett
(This used to be commit 2a22f413c9)
2007-10-10 13:18:21 -05:00
Andrew Tridgell
44a04d74cd r7668: - setup HAVE_ILDAP to enable the ildap backend in ldb
- fixed a bug in socket_connect_ev()
(This used to be commit 3f77b879a0)
2007-10-10 13:18:20 -05:00
Stefan Metzmacher
8f85427d6d r7643: This patch adds a new NTPTR subsystem:
- this is an abstraction layer for print services,
  like out NTVFS subsystem for file services

- all protocol specific details are still in rpc_server/spoolss/
  - like the stupid in and out Buffer handling
  - checking of the r->in.server_name
  - ...

- this subsystem can have multiple implementation
  selected by the "ntptr providor" global-section parameter

- I currently added a "simple_ldb" backend,
  that stores Printers, Forms, Ports, Monitors, ...
  in the spoolss.db, and does no real printing
  this backend is basicly for testing, how the spoolss protocol
  works

- the interface is just a prototype and will be changed a bit
  the next days or weeks, till the simple_ldb backend can
  handle all calls that are used by normal w2k3/xp clients

- I'll also make the api async, as the ntvfs api
  this will make things like the RemoteFindFirstPrinterChangeNotifyEx(),
  that opens a connection back to the client, easier to implement,
  as we should not block the whole smbd for that

- the idea is to later implement a "unix" backend
  that works like the current samba3 code

- and maybe some embedded print server vendors can write there own
  backend that can directly talk to a printer without having cups or something like this

- the default settings are (it currently makes no sense to change them :-):

ntptr providor = simple_ldb
spoolss database = $private_dir/spoolss.db

metze
(This used to be commit 455b5536d4)
2007-10-10 13:18:16 -05:00
Andrew Tridgell
bab977dad7 r7626: a new ldap client library. Main features are:
- hooked into events system, so requests can be truly async and won't
   interfere with other processing happening at the same time

 - uses NTSTATUS codes for errors (previously errors were mostly
   ignored). In a similar fashion to the DOS error handling, I have
   reserved a range of the NTSTATUS code 32 bit space for LDAP error
   codes, so a function can return a LDAP error code in a NTSTATUS

 - much cleaner packet handling
(This used to be commit 2e3c660b2f)
2007-10-10 13:18:14 -05:00
Andrew Tridgell
3e92471d4c r7596: next step in ldap cleanup. I'm aiming to get rid of the cut&pasted
ldif parsing code in libcli/ldap/ldap_ldif.c, and instead use the ldb
ldif code. To do that I have changed the ldap code to use 'struct
ldb_message_element' instead of 'struct ldap_attribute'. They are
essentially the same structure anyway, so by making them really the
same it will be much easier to use the ldb code in libcli/ldap/

I have also made 'struct ldb_val' the same as a DATA_BLOB, which will
simplify data handling in quite a few places (I haven't yet removed
all the code that maps between these two, that will come later)
(This used to be commit 87fc307339)
2007-10-10 13:18:12 -05:00
Andrew Tridgell
4b0e5bd753 r7527: - added a ldb_search_bytree() interface, which takes a ldb_parse_tree
instead of a search expression. This allows our ldap server to pass
  its ASN.1 parsed search expressions straight to ldb, instead of going
  via strings.

- updated all the ldb modules code to handle the new interface

- got rid of the separate ldb_parse.h now that the ldb_parse
  structures are exposed externally

- moved to C99 structure initialisation in ldb

- switched ldap server to using ldb_search_bytree()
(This used to be commit 96620ab2ee)
2007-10-10 13:18:06 -05:00
Andrew Bartlett
2b4791ae73 r7525: Unify lp_load(), load_interfaces and logging setup into popt().
There is now a new --debug-stderr option to enable debug to STDERR.

popt isn't perfect, but the callbacks are used in all the main Samba
binaries, and should be used in the rest.  This avoids duplicated
code, and ensures every binary is setup correctly.

This also ensures the setup happens early enough to have -s function,
and have a correct impact on the credentials code.  (Fixing a bug that
frustrated tridge earlier today).

The only 'subtle' aspect of all this is that I'm pretty sure that the
SAMBA_COMMON popt code must be above the CREDENTIALS code, in the
popt tables.

Andrew Bartlett
(This used to be commit 50f3c2b3a2)
2007-10-10 13:18:06 -05:00
Rafal Szczesniak
c29896d0ae r7490: Rename functions and prefices s/rpc_composite/libnet_rpc/
This makes more clear where the functions belong to. Also
the rule will be that lowercased function names are not
part of "official" libnet API (though it doesn't mean one
absolutely cannot use them).

rafal
(This used to be commit f6ef7b882a)
2007-10-10 13:17:59 -05:00
Rafal Szczesniak
ae6907c5c8 r7379: Simplify CreateUser function and io structure. Also, implementing
it based on composite functions. Moving to fully async CreateUser
on the way...

rafal
(This used to be commit 240409bc3c)
2007-10-10 13:17:48 -05:00
Andrew Tridgell
bce8cda061 r7352: the internal heimdal build change. This changes quite a few things:
- if you want kerberos now, you need to unpack a lorikeet heimdal
   tree in source/heimdal/. If source/heimdal/ does not exist at
   configure time then all kerberos features are disabled. You cannot
   use an external kerberos library for now. That may change later.

 - moved lib/replace/ config stuff to lib/replace/ and create a
   lib/replace/replace.h. That allows the heimdal build to use our
   portability layer, and prevenets duplicate definitions of functions
   like strlcat()

 - if you do enable heimdal, then you will need to do 'make
   HEIMDAL_EXTERNAL' before you build Samba. That should be fixed once
   I explain the problem to jelmer (the problem is the inability to
   set a depend without also dragging in the object list of the
   dependency. We need this for building the heimdal asn1 compiler and
   et compiler.

 - disabled all of the m4 checks for external kerberos libraries. I
   left them in place in auth/kerberos/, but disabled it in
   configure.in

some of the heimdal_build/ code is still very rough, for example I
don't correctly detect the correct awk, flex, bison replacements for
heimdal_build/build_external.sh. I expect to fix that stuff up over
the next few days.
(This used to be commit d4648249b2)
2007-10-10 13:17:45 -05:00
Stefan Metzmacher
9a831a3963 r7328: fix GetPrinterData and SetPrinterData, with zero length subcontexts
metze
(This used to be commit 73d597bacf)
2007-10-10 13:17:42 -05:00
Andrew Tridgell
bf1ffa283c r7294: implemented the irpc messaging system. This is the core of the
management system I proposed on samba-technical a couple of days
ago. Essentially it is a very lightweight way for any code in Samba to
make IDL based rpc calls to anywhere else in the code, without the
client or server having to go to the trouble of setting up a full rpc
service.

It can be used with any of our existing IDL, but I expect it will
mostly be used for a new set of Samba specific management calls.

The LOCAL-IRPC torture test demonstrates how it can be used by calling
the echo_AddOne() call over this transport.
(This used to be commit 3d589a0995)
2007-10-10 13:17:37 -05:00
Derrell Lipman
a1ba224107 r7276: - moved static tdb function ltdb_dn_fold() into common/ so that it can be
called from multiple backends.  (ldb_sqlite3 needs it too.)  Added parameter
  for a callback function that determines whether an attribute needs case
  folding.
- begin to prepare for sqlite3 in build process
- work-in-progress updates, on ldb_sqlite3
(This used to be commit a80bced0b9)
2007-10-10 13:17:35 -05:00
Tim Potter
6bf9b5cd9a r7253: Fix build.
(This used to be commit 54ff16b9a1)
2007-10-10 13:17:32 -05:00
Rafal Szczesniak
af61fb8771 r7251: Initial work on composite domain open call.
rafal
(This used to be commit be3b283b20)
2007-10-10 13:17:31 -05:00
Jelmer Vernooij
77c3d463c8 r7248: Remove enum that is causing trouble on AIX
(This used to be commit 512536c916)
2007-10-10 13:17:31 -05:00
Andrew Bartlett
51fc684227 r7221: Add the start of a KDC service (to be built on a 'libkdc' from a to be
included Heimdal) to Samba4.

Andrew Bartlett
(This used to be commit 51ba3ea60c)
2007-10-10 13:17:27 -05:00
Stefan Metzmacher
6dd757005a r7183: add some forward declarations ...
metze
(This used to be commit e9f30ad698)
2007-10-10 13:17:24 -05:00
Andrew Tridgell
1511cde44c r7002: added support for getting at loadparm config parameters via lpGet() in esp scripts
lpGet takes 4 forms
    v = lpGet("type:parm");             gets a parametric variable
    v = lpGet("share", "type:parm");    gets a parametric variable on a share
    v = lpGet("parm");                  gets a global variable
    v = lpGet("share", "parm");         gets a share variable

in all cases a ejs object of the appropriate type for the variable is returned.

This commit also adds the function typeof() which returns the type of an object
(This used to be commit 5537a0d38d)
2007-10-10 13:17:04 -05:00
Andrew Tridgell
7e58231952 r6982: install the swat pages with 'make installswat'
(This used to be commit 31543e1eae)
2007-10-10 13:17:02 -05:00
Andrew Tridgell
d70912a26a r6981: first version of the builtin web server for Samba4
This includes an embedded server side scripting system called 'esp'
(see http://www.appwebserver.org/products/esp/esp.html) and javascript
based scripting language called 'esj' (see
http://www.appwebserver.org/products/ejs/ejs.html)

The justification for including this scripting language is that it
should make it much easier to write a high quality web interface for
Samba4. The scripting language can call into any Samba4 library code
(so for example it will be able to make ldb and loadparm calls), plus
it provides easy support for forms, cookies, sessions etc.

There is still quite a bit more work to do on the web server, but
there is enough here now for people to look at and comment. I will be
committing some sample web pages that test esp functionality shortly.
(This used to be commit 26f0ba92c0)
2007-10-10 13:17:01 -05:00
Rafal Szczesniak
d516fa53aa r6963: Further definitions for share manipulation code. Untested.
Original patch provided by Gregory Leocadie <gleocadie@idealx.com>

rafal
(This used to be commit eb83a8210a)
2007-10-10 13:17:00 -05:00
Andrew Bartlett
2a01014f8f r6879: Another attempt at including the 'right' kerberos headers on
dual-install systems.

Andrew Bartlett
(This used to be commit efc24f1a45)
2007-10-10 13:16:53 -05:00
Andrew Bartlett
fc748e650f r6811: Another attempt at better kerberos/gssapi headers.
Andrew Bartlett
(This used to be commit f4b7484516)
2007-10-10 13:16:46 -05:00
Andrew Bartlett
3a9c42c033 r6806: Try again to fix the build on various kerberos libs.
Andrew Bartlett
(This used to be commit 5749b63f17)
2007-10-10 13:16:46 -05:00
Andrew Bartlett
1d0e2b9569 r6803: Try to bring in the correct GSSAPI headers for the krb5 mech. This
should allow us to ditch the local static storage for OIDs, as well as
fix the build on non-heimdal platforms.

Andrew Bartlett
(This used to be commit a7e2ecfac9)
2007-10-10 13:16:45 -05:00
Andrew Bartlett
5c6dd5e800 r6800: A big GENSEC update:
Finally remove the distinction between 'krb5' and 'ms_krb5'.  We now
don't do kerberos stuff twice on failure.  The solution to this is
slightly more general than perhaps was really required (as this is a
special case), but it works, and I'm happy with the cleanup I achived
in the process.  All modules have been updated to supply a
NULL-terminated list of OIDs.

In that process, SPNEGO code has been generalised, as I realised that
two of the functions should have been identical in behaviour.

Over in the actual modules, I have worked to remove the 'kinit' code
from gensec_krb5, and placed it in kerberos/kerberos_util.c.

The GSSAPI module has been extended to use this, so no longer requires
a manual kinit at the command line.  It will soon loose the
requirement for a on-disk keytab too.

The general kerberos code has also been updated to move from
error_message() to our routine which gets the Heimdal error string
(which may be much more useful) when available.

Andrew Bartlett
(This used to be commit 0101728d8e)
2007-10-10 13:16:45 -05:00
Jelmer Vernooij
15a8f0ff0a r6752: Patch by Steven Edwards to improve portability to mingw32
(This used to be commit 8d63cd33a2)
2007-10-10 13:16:41 -05:00
Andrew Tridgell
2279d1ebfb r6747: first working version of cldapd server. It is missing 'sites' support, and
filling in some of the returned parameters is quite rough, but it seems to work OK
(This used to be commit e564e3e596)
2007-10-10 13:16:41 -05:00
Andrew Tridgell
7b18fcd847 r6725: the beginnings of a cldap server
(This used to be commit e51e0dffa8)
2007-10-10 13:16:38 -05:00
Rafal Szczesniak
44f981ad0b r6615: As usual, I forgot to commit new structure in this file...
rafal
(This used to be commit 3389cfb135)
2007-10-10 13:16:31 -05:00
Andrew Bartlett
8bf57cf8f5 r6573: Start on my project to implement an NT4 compatible BDC in Samba4.
This brings in a compatability layer for Samba3 in Samba4 - where we
will start to define file formats and similar details.

The 'net samdump' command uses 'password server = ' for now, and
performs a similar task to Samba3's 'net rpc samsync'.

Andrew Bartlett
(This used to be commit 550f17f992)
2007-10-10 13:16:27 -05:00
Andrew Bartlett
85e9412c47 r6565: Cludge, cludge, cludge...
We need to pass the 'secure channel type' to the NETLOGON layer, which
must match the account type.

(Yes, jelmer objects to this inclusion of the kitchen sink ;-)

Andrew Bartlett
(This used to be commit 8ee208a926)
2007-10-10 13:16:26 -05:00
Andrew Bartlett
4e29d24b4c r6467: keep the compiler quiet with another entry in structs.h
Andrew Bartlett
(This used to be commit 106047032f)
2007-10-10 13:11:40 -05:00
Andrew Bartlett
0501a440be r6462: Move the arcfour sbox state into it's own structure, and allocate it
with talloc() for the NTLMSSP system.

Andrew Bartlett
(This used to be commit 7a93ac49c2)
2007-10-10 13:11:39 -05:00
Rafal Szczesniak
dea0c8729f r6414: Added composite user del function. Slightly broken still, but I don't
want it to hang around not commited.

rafal
(This used to be commit 98d98b9bc7)
2007-10-10 13:11:35 -05:00
Rafal Szczesniak
30cb6046cb r6382: New structure for useradd call.
rafal
(This used to be commit 3752122550)
2007-10-10 13:11:34 -05:00
Alexander Bokovoy
9779e6d670 r6352: Two new composite calls:
- qfsinfo (query file system information)
- appendacl (append an ACL to existing file's security descriptor and get new
full ACL)

The second one also includes an improvement to security descriptor handling
which allows to copy security descriptor. Written by Peter Novodvorsky
<peter.novodvorsky@ru.ibm.com>

Both functions have corresponding torture tests added. Tested under valgrind and
work against Samba 4 and Windows XP.

ToDo: document composite call creation process in prog_guide.txt
(This used to be commit 441cff62ac)
2007-10-10 13:11:34 -05:00
Andrew Tridgell
d9c15b0f28 r6342: fixed a bad union assumption that caused ACLs to fail on 64 bit machines
Thanks to lars and agruen for finding this
(This used to be commit 2acc069185)
2007-10-10 13:11:33 -05:00
Andrew Bartlett
6d1ae6d35a r6271: Don't zero the cli_credentials structure - instead allow valgrind to
track the use of un-initialised values.

This change will require a recompile from clean, as the enum
describing the status of each element now has a default of
CRED_UNINITIALISED.

Andrew Bartlett
(This used to be commit 83c2eb806d)
2007-10-10 13:11:29 -05:00
Andrew Tridgell
b0ca8ed455 r6247: added the server side code for receiving mailslot requests, and
parsing incoming netlogon requests. No replies are sent yet.
(This used to be commit 3b34df6a67)
2007-10-10 13:11:28 -05:00
Andrew Tridgell
6db5d09dba r6185: added LIBCLI_DGRAM to the list of libs to be built as part of LIBCLI
(This used to be commit 47e1452da0)
2007-10-10 13:11:24 -05:00
Stefan Metzmacher
3abce73193 r6179: - add new spoolss tests for all spoolss_Enum*() calls which didn't need
a handle as parameter,

  EnumPorts
  EnumPrinterDrivers
  EnumMonitors
  EnumPrintProcessors
  EnumPrinters

  we now do cross checks between the different info levels
  and sore the results in a global context,
  so that we later can add cross checks between the different object types

- add idl for EnumMonitors and EnumPrintProcessors

metze
(This used to be commit 92a3721bc7)
2007-10-10 13:11:23 -05:00
Jelmer Vernooij
848329b9a0 r6140: - Add configure option for enabling the socket-wrapper library, so it
can be enabled on the buildfarm without requiring --enable-developer
- Support tcp and udp being used on the same port
- FIx some portability issues (should fix the build on
							   some hosts on the buildfarm)
- Ignore setting TCP_NODELAY on (semi-)TCP sockets rather then complain about
  it not being supported (saves us from a couple of error messages for each
						  connection that is opened)
(This used to be commit 443fb7853b)
2007-10-10 13:11:21 -05:00
Jelmer Vernooij
44d7f4f238 r6139: Move socket_wrapper to a seperate directory
(This used to be commit a2ef9225f1)
2007-10-10 13:11:21 -05:00
Stefan Metzmacher
d2f2d5c798 r6134: add a new type dom_sid28 which is a 28 byte fixed buffer with a dom_sid in it
metze
(This used to be commit 460d1b089e)
2007-10-10 13:11:21 -05:00
Jelmer Vernooij
e91fb065fa r6088: Add the socket_wrapper library. This is a very simple library that
redirects traffic (currently just IP traffic) over unix domain sockets
if the SOCKET_WRAPPER_DIR environment variable has been set.
Aim is to use this for the Samba4 torture suite on the buildfarm.

The socket_wrapper library can only be used if Samba was compiled with
--enable-developer.

test_rpc.sh passes against a local smbd with SOCKET_WRAPPER_DIR set.
(and ethereal showed no traffic whatsoever)

Stuff that still needs to be fixed in socketwrapper:
 - Give ENETUNREACH if target is not localhost
 - A given port number can only be used for UDP /or/ TCP, not both.
 - Perhaps allow some calls to circumvent socketwrapper (do we need DNS?)
(This used to be commit f8a63a843c)
2007-10-10 13:11:18 -05:00
Andrew Bartlett
2eb3d68062 r6028: A MAJOR update to intergrate the new credentails system fully with
GENSEC, and to pull SCHANNEL into GENSEC, by making it less 'special'.

GENSEC now no longer has it's own handling of 'set username' etc,
instead it uses cli_credentials calls.

In order to link the credentails code right though Samba, a lot of
interfaces have changed to remove 'username, domain, password'
arguments, and these have been replaced with a single 'struct
cli_credentials'.

In the session setup code, a new parameter 'workgroup' contains the
client/server current workgroup, which seems unrelated to the
authentication exchange (it was being filled in from the auth info).

This allows in particular kerberos to only call back for passwords
when it actually needs to perform the kinit.

The kerberos code has been modified not to use the SPNEGO provided
'principal name' (in the mechListMIC), but to instead use the name the
host was connected to as.  This better matches Microsoft behaviour,
is more secure and allows better use of standard kerberos functions.

To achieve this, I made changes to our socket code so that the
hostname (before name resolution) is now recorded on the socket.

In schannel, most of the code from librpc/rpc/dcerpc_schannel.c is now
in libcli/auth/schannel.c, and it looks much more like a standard
GENSEC module.  The actual sign/seal code moved to
libcli/auth/schannel_sign.c in a previous commit.

The schannel credentails structure is now merged with the rest of the
credentails, as many of the values (username, workstation, domain)
where already present there.  This makes handling this in a generic
manner much easier, as there is no longer a custom entry-point.

The auth_domain module continues to be developed, but is now just as
functional as auth_winbind.  The changes here are consequential to the
schannel changes.

The only removed function at this point is the RPC-LOGIN test
(simulating the load of a WinXP login), which needs much more work to
clean it up (it contains copies of too much code from all over the
torture suite, and I havn't been able to penetrate its 'structure').

Andrew Bartlett
(This used to be commit 2301a4b38a)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
038c4c4c6a r6024: Some of the ordering constraints on the popt callbacks were getting
painful, so don't call lp_*() functions until the post stage (rather
than in the cli_credentails_init(), which is called in the pre stage),
and don't open the secrets.ldb looking for the machine account details
until we actually need them (well after popt is done, and we know we have the other things right).

Set the domain and realm, as well as the account and password for -P
(fetch machine password) operation.

Allow NETLOGON credentials to be stored in this structure - will allow
SCHANNEL to be made more generic.

Clarify why we don't do special checks for NULL pointers, particularly
in the anonymous check (it indicates a programmer error, not a
run-time condition).

Also make lib/credentials.c a little more consistant.

Andrew Bartlett
(This used to be commit 730e6056b7)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
79f6bcd5ae r5988: Fix the -P option (use machine account credentials) to use the Samba4
secrets system, and not the old system from Samba3.

This allowed the code from auth_domain to be shared - we now only
lookup the secrets.ldb in lib/credentials.c.

In order to link the resultant binary, samdb_search() has been moved
from deep inside rpc_server into lib/gendb.c, along with the existing
gendb_search_v().  The vast majority of this patch is the simple
rename that followed,

(Depending on the whole SAMDB for just this function seemed pointless,
and brought in futher dependencies, such as smbencrypt.c).

Andrew Bartlett
(This used to be commit e13c671619)
2007-10-10 13:11:12 -05:00
Jelmer Vernooij
13b0776f60 r5929: Use cli_credentials for the SMB functions as well.
Fix a couple of bugs in the new cli_credentials code
(This used to be commit 4ad481cfe5)
2007-10-10 13:11:09 -05:00
Jelmer Vernooij
05bc2d7b2c r5928: Use cli_credentials in:
- gtk+ (returned by GtkHostBindingDialog as well now)
 - torture/
 - librpc/
 - lib/com/dcom/
(This used to be commit ccefd78233)
2007-10-10 13:11:08 -05:00
Jelmer Vernooij
02075be0bb r5917: First step in using the new cli_credentials structure. This patch
puts support for it into popt_common, adds a few utility functions
(in lib/credentials.c) and the callback functions for the command-line
(lib/cmdline/credentials.c). Comments are welcome :-)
(This used to be commit 1d49b57c50)
2007-10-10 13:11:08 -05:00
Jelmer Vernooij
ef213b0248 r5866: Add InitShutdown IDL and torture test.
Implement push side of NDR_LEN4|NDR_NOTERM strings (pull side was already present)
(This used to be commit ea61ec1122)
2007-10-10 13:11:05 -05:00
Stefan Metzmacher
d7b5a565ef r5828: add some idl for DsAddEntry()
metze
(This used to be commit 3e6ec81128)
2007-10-10 13:11:04 -05:00
Stefan Metzmacher
55546176c6 r5800: fix recursiv printing in ndr_print_DsGetNCChangesInfo1()
metze
(This used to be commit 1084ad4bfc)
2007-10-10 13:11:04 -05:00
Stefan Metzmacher
736797ef7f r5737: add some error codes
metze
(This used to be commit f543eb4ede)
2007-10-10 13:11:01 -05:00
Steve French
020817e152 r5716: Add new Unix extensions defines for infolevels
(This used to be commit 7f6ea98e0f)
2007-10-10 13:11:00 -05:00
Jelmer Vernooij
77ec3f684d r5674: - Re-enable DCOM support.
- Always put IID in vtables (useful for asserts)
- Add table to keep track of DCOM proxy classes
- Bunch of smaller bug fixes
(This used to be commit 26d5a0b92c)
2007-10-10 13:10:59 -05:00
Simo Sorce
b1b14817ea r5585: LDB interfaces change:
changes:
- ldb_wrap disappears from code and become a private structure of db_wrap.c
  thanks to our move to talloc in ldb code, we do not need to expose it anymore

- removal of ldb_close() function form the code
  thanks to our move to talloc in ldb code, we do not need it anymore
  use talloc_free() to close and free an ldb database

- some minor updates to ldb modules code to cope with the change and fix some
  bugs I found out during the process
(This used to be commit d58be9e74b)
2007-10-10 13:10:55 -05:00
Alexander Bokovoy
95bb95715c r5538: Fix typo in comment -- non-existant constant name mentioned
(This used to be commit 1d033d9dba)
2007-10-10 13:10:53 -05:00
Rafal Szczesniak
1bee0173ec r5499: Commit forgotten change what tridge immediately pointed out
in his comments to new rpc composite code.

rafal
(This used to be commit 1294db747e)
2007-10-10 13:10:51 -05:00
Jelmer Vernooij
80d3047333 r5490: The big (D)COM commit! :-) Contains most of the changes described in the
DCOM paper in lorikeet. This is the result of 1.5 months work (mainly
figuring out how things *really* work) at the end of 2004.

In general:
- Clearer distinction between COM and DCOM. DCOM is now merely
  the glue between DCE/RPC+ORPC and COM. COM can also work without
  DCOM now. This makes the code a lot clearer.
- Clearer distinction between NDR and DCOM. Before, NDR had a couple of
  "if"s to cope with DCOM, which are now gone.
- Use "real" arguments rather then structures for function arguments in
  COM, mainly because most of these calls are local so packing/unpacking
  data for every call is too much overhead (both speed- and code-wise)
- Support several mechanisms to load class objects:
  - from memory (e.g. part of the current executable, registered at start-up)
  - from shared object files
  - remotely
- Most things are now also named COM rather then DCOM because that's what it
  really is. After an object is created, it no longer matters whether it
  was created locally or remotely.

There is a very simple example class that contains
both a class factory and a class that implements the IStream interface.
It can be tested (locally only, remotely is broken at the moment)
by running the COM-SIMPLE smbtorture test.

Still to-do:
 - Autogenerate parts of the class implementation code (using the coclass definitions in IDL)
 - Test server-side
 - Implement some of the common classes, add definitions for common interfaces.
(This used to be commit 71fd3e5c3a)
2007-10-10 13:10:50 -05:00
Stefan Metzmacher
6b4cac2c00 r5489: hide handwritten pull/push/print code from the caller
for the spoolss_Enum* functions

metze
(This used to be commit bfcc86e706)
2007-10-10 13:10:50 -05:00
Andrew Tridgell
42d6a4c4f0 r5451: - added separate wrepl_associate(), wrepl_pull_table() and wrepl_pull_names() functions, with reasonable
parameters, so callers don't need to deal directly with wins replication packet structures

- converted the NBT-WINSREPLICATION torture test to use the new APIs
(This used to be commit cec1672662)
2007-10-10 13:10:47 -05:00
Andrew Tridgell
a6878f6c6e r5414: - added libcli/wins/, a basic client library for WINS replication
- added a new IDL type "udlongr", which is like udlong, but with the
  two uint32 halves reversed

- modified the winsrepl.idl to cope with a wider range of packets
(This used to be commit bc8d60c918)
2007-10-10 13:10:43 -05:00
Andrew Tridgell
40d117a893 r5372: fixed the build
(This used to be commit 2899d28945)
2007-10-10 13:09:48 -05:00
Andrew Tridgell
e199f4cef2 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 9aa3313b3f)
2007-10-10 13:09:45 -05:00
Andrew Bartlett
6f01a68faa r5334: Bah, it's all to hard...
Andrew Bartlett
(This used to be commit a28ca320dc)
2007-10-10 13:09:43 -05:00
Andrew Bartlett
c8ca613e93 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 34b1da7303)
2007-10-10 13:09:43 -05:00
Andrew Tridgell
a0e6f6c05b r5309: removed ads.h from includes.h
(This used to be commit 196c45b834)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
75ddf59ea1 r5308: trimmed back a lot of the old macros from smb_macros.h
(This used to be commit bf43c9bdcf)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
a5bd1ccada r5307: removed db_wrap.h from includes.h
(This used to be commit 826baec7b3)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
6aa6dce3f7 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 cfee0fb02e)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
501379431c r5305: removed libcli/ldap/ldap.h from includes.h
(This used to be commit 0df3fdd817)
2007-10-10 13:09:39 -05:00
Andrew Tridgell
bed7c9ec32 r5304: removed lib/socket/socket.h from includes.h
(This used to be commit b902ea546d)
2007-10-10 13:09:39 -05:00
Andrew Tridgell
e82aad1ce3 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 9db6c79e90)
2007-10-10 13:09:38 -05:00
Andrew Tridgell
fedf0b0d91 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 6f79432fe6)
2007-10-10 13:09:38 -05:00
Andrew Tridgell
b9bb7f596d 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 bb1ab11d8e)
2007-10-10 13:09:37 -05:00
Stefan Metzmacher
73d317e0da r5285: add a generic dlist_item struct which has a void *ptr for the data
metze
(This used to be commit 7dbd9e7aab)
2007-10-10 13:09:36 -05:00
Andrew Tridgell
2513ac33de 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 2502b02898)
2007-10-10 13:09:36 -05:00
Andrew Tridgell
dfe907313b r5253: need to pre-declare some structures
(This used to be commit a4d44d4a9d)
2007-10-10 13:09:35 -05:00
Andrew Tridgell
4559bc7796 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 75a6cfb2f6)
2007-10-10 13:09:34 -05:00
Andrew Tridgell
0628d5fdeb r5248: fixed a silly bug in DLIST_ADD_AFTER()
(This used to be commit e36b6882fd)
2007-10-10 13:09:34 -05:00
Jelmer Vernooij
58a9570353 r5237: Add error code for "class not registered"
(This used to be commit b72a0ac654)
2007-10-10 13:09:33 -05:00
Andrew Tridgell
131dc76d56 r5197: moved events code to lib/events/ (suggestion from metze)
(This used to be commit 7f54c8a339)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
0798d54b4f 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 236403cc4d)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
dd638d3e53 r5187: ordered the timed events in the events code, which makes processing
events much more efficient (no linked lists need to be traversed, so
large numbers of timers are no problem)
(This used to be commit b45b9436d7)
2007-10-10 13:09:29 -05:00
Andrew Tridgell
66170ef8b3 r5185: make all the events data structures private to events.c. This will
make it possible to add optimisations to the events code such as
keeping the next timed event in a sorted list, and using epoll for
file descriptor events.

I also removed the loop events code, as it wasn't being used anywhere,
and changed timed events to always be one-shot (as adding a new timed
event in the event handler is so easy to do if needed)
(This used to be commit d7b4b6de51)
2007-10-10 13:09:29 -05:00
Andrew Tridgell
9b9c23b19b r5155: define ipv4address as a based IDL type, mapped to a "const char *" in
the header, and defined on the wire as a 4 byte network byte order
IP. This means the calling code doesn't have to worry about network
byte order conversions.
(This used to be commit 72048e3717)
2007-10-10 13:09:28 -05:00
Stefan Metzmacher
ca3f70256a r5145: define struct ipv4_addr in misc.idl,
so we can use it in nbt.idl and
get a nicer debug output

metze
(This used to be commit abacbc9192)
2007-10-10 13:09:27 -05:00
Stefan Metzmacher
3b6fb59314 r5144: add more forward declarations
metze
(This used to be commit c5a24792db)
2007-10-10 13:09:27 -05:00
Stefan Metzmacher
73a0b6ea47 r5134: - fix types to always use _t types
- add #include "system/filesys.h" where needed

metze
(This used to be commit 6bb07a0ed8)
2007-10-10 13:09:25 -05:00
Andrew Tridgell
9a70f446fc r5126: the composite code is no longer client specific or smb specific, so
rename the core structure to composite_context and the wait routine to
composite_wait() (suggestion from metze)
(This used to be commit cf11d05e35)
2007-10-10 13:09:25 -05:00
Andrew Tridgell
2e953b967a r5121: added periodic name refresh requests for all our registered names, reporting any
name conflicts
(This used to be commit 69e6a1cd4b)
2007-10-10 13:09:24 -05:00
Andrew Tridgell
5e6082b4b0 r5117: used a composite function to add 4 stage name registration. We send 3
broadcast name registration demands per name per interface at 1 second
intervals, then send a name overwrite request and demand. Any name
conflict replies are reported.
(This used to be commit d656fba6f1)
2007-10-10 13:09:24 -05:00
Andrew Tridgell
414f6c80b2 r5114: the nbtd task can now act as a basic B-node server. It registers its
names on the network and answers name queries. Lots of details are
still missing, but at least this now means you don't need a Samba3
nmbd to use Samba4.

missing pieces include:

 - name registrations should be "shout 3 times, then demand"

 - no WINS server yet

 - no master browser code
(This used to be commit d7d31fdc66)
2007-10-10 13:09:23 -05:00
Andrew Tridgell
c7ded5ab0a r5108: the beginnings of a nbtd server for Samba4. Currently just displays
the packets it receives, but it at least shows how the server
structure will work.

To implement it I extended the libcli/nbt/ library to allow for an
incoming packet handler to be registered. That allows the nbt client
library to be used for low level processing of the nbtd server packets.

Other changes:

 - made the socket library always set SO_REUSEADDR when binding to an
   interface, to ensure that restarts of a server don't have to wait
   for a couple of minutes.

 - made the nbt port configurable. Defaults to 137, but other ports
   will be useful for testing.
(This used to be commit 2fedca6adf)
2007-10-10 13:09:23 -05:00
Andrew Tridgell
1447b9a8c1 r5104: - added support for task based servers. These are servers that within
themselves are run as a single process, but run as a child of the
  main process when smbd is run in the standard model, and run as part
  of the main process when in the single mode.

- rewrote the winbind template code to use the new task services. Also
  fixed the packet queueing

- got rid of event_context_merge() as it is no longer needed
(This used to be commit 339964a596)
2007-10-10 13:09:23 -05:00
Andrew Tridgell
55d4d36993 r5102: This is a major simplification of the logic for controlling top level
servers in smbd. The old code still contained a fairly bit of legacy
from the time when smbd was only handling SMB connection. The new code
gets rid of all of the smb_server specific code in smbd/, and creates
a much simpler infrastructures for new server code.

Major changes include:

 - simplified the process model code a lot.

 - got rid of the top level server and service structures
   completely. The top level context is now the event_context. This
   got rid of service.h and server.h completely (they were the most
   confusing parts of the old code)

 - added service_stream.[ch] for the helper functions that are
   specific to stream type services (services that handle streams, and
   use a logically separate process per connection)

 - got rid of the builtin idle_handler code in the service logic, as
   none of the servers were using it, and it can easily be handled by
   a server in future by adding its own timed_event to the event
   context.

 - fixed some major memory leaks in the rpc server code.

 - added registration of servers, rather than hard coding our list of
   possible servers. This allows for servers as modules in the future.

 - temporarily disabled the winbind code until I add the helper
   functions for that type of server

 - added error checking on service startup. If a configured server
   fails to startup then smbd doesn't startup.

 - cleaned up the command line handling in smbd, removing unused options
(This used to be commit cf6a46c3cb)
2007-10-10 13:09:22 -05:00
Andrew Tridgell
db75b1c8f7 r5038: we don't need these defines any more
(This used to be commit 03697fc761)
2007-10-10 13:09:16 -05:00
Andrew Tridgell
759da3b915 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
(This used to be commit ec32b22ed5)
2007-10-10 13:09:15 -05:00
Andrew Tridgell
3dd17f1288 r5034: - added a type mapping function in pidl, so the type names in our IDL
files don't need to match the type names in the generated headers

- with this type mapping we no longer need definitions for the
  deprecated "int32", "uint8" etc form of types. We can now force
  everyone to use the standard types int32_t, uint8_t etc.

- fixed all the code that used the deprecated types

- converted the IDL types "int64" and "uint64" to "dlong" and
  "udlong". These are the 4 byte aligned 64 bit integers that
  Microsoft internally define as two 32 bit integers in a
  structure. After discussions with Ronnie Sahlberg we decided that
  calling these "int64" was confusing, as it implied a true 8 byte
  aligned type

- fixed all the cases where we incorrectly used things like
  "NTTIME_hyper" in our C code. The generated API now uses a NTTIME for
  those. The fact that it is hyper-aligned on the wire is not relevant
  to the API, and should remain just a IDL property
(This used to be commit f86521677d)
2007-10-10 13:09:15 -05:00
Tim Potter
051c7b5e0c r4980: Copy RAP callno constants from Samba 3 and start to use them.
(This used to be commit e32ade4485)
2007-10-10 13:09:11 -05:00
Volker Lendecke
63ba8383e1 r4949: First version of a fetchfile composite function which connects to a server and
loads a file. Needs a smb url parsing wrapper.

Volker
(This used to be commit fa435bf7c8)
2007-10-10 13:09:08 -05:00
Andrew Tridgell
fd62df6418 r4943: Smplified the events handling code a lot. The first source of
complexity was that events didn't automatically cleanup
themselves. This was because the events code was written before we had
talloc destructors, so you needed to call event_remove_XX() to clean
the event out of the event lists from every piece of code that used
events. I have now added automatic event destructors, which in turn
allowed me to simplify a lot of the calling code.

The 2nd source of complexity was caused by the ref_count, which was
needed to cope with event handlers destroying events while handling
them, which meant the linked lists became invalid, so the ref_count ws
used to mark events for later destruction.

The new system is much simpler. I now have a ev->destruction_count,
which is incremented in all event destructors. The event dispatch code
checks for changes to this and handles it.
(This used to be commit a3c7417cfe)
2007-10-10 13:09:08 -05:00
Andrew Tridgell
51f3a6a5e8 r4900: build fix for IRIX 6.5
(This used to be commit f6ff9e6f39)
2007-10-10 13:09:05 -05:00
Andrew Bartlett
2c0cb15005 r4895: I missed this in my previous 'use secrets.ldb' commit.
Andrew Bartlett
(This used to be commit 53b98c674b)
2007-10-10 13:09:04 -05:00
Andrew Tridgell
cda0a7e76e r4892: we don't need nameserv.h any more
(This used to be commit 1c83c80ef2)
2007-10-10 13:09:03 -05:00
Andrew Tridgell
ea923fb4a2 r4885: added a new NBT client library. Features include:
- structures defined using IDL in nbt.idl
 - build around our events structure, and talloc
 - fully async
 - supports all NBT packet fields as per rfc1002
 - easy interfaces for name query and status

For the moment there are just a couple of test functions in
namequery.c, test_name_query() and test_name_status(). These will be
removed when we hook the new library into libcli/ fully

The new library will also be a fairly good basis for a nbt
server. Although it can't be a server as-is, I wrote it with the needs
of a server in mind (for example, extremely scalable idtree based
packet handling)
(This used to be commit ae7e625bfa)
2007-10-10 13:09:01 -05:00
Andrew Tridgell
8451b2658c r4817: ccache was being made ineffective on all the build farm machines
because the version number was being auto-updated and included in all
C files. With this change it is only included where needed.
(This used to be commit 520cff73c6)
2007-10-10 13:08:59 -05:00
Tim Potter
e62bce854f r4816: Note that NTTIME is 4-byte aligned which makes the comment about alignment
for NTTIME_hyper make a bit more sense.
(This used to be commit 03c1dcb596)
2007-10-10 13:08:58 -05:00
Andrew Tridgell
5dbebbe2ad r4781: the tolower() in schema.c is a premature optimisation. I suspect the
"distinguishedName" checking in that module is incorrect and should be
removed, but meanwhile, lets not make it slow down the compile of
every other module.
(This used to be commit 6534ce650b)
2007-10-10 13:08:54 -05:00
Jelmer Vernooij
7b0f375a86 r4780: tolower() requires ctype.h
(This used to be commit e22bfa8ae2)
2007-10-10 13:08:54 -05:00
Andrew Tridgell
7cbc768376 r4777: added a smb_composite_sesssetup() async composite function. This
encapsulates all the different session setup methods, including the
multi-pass spnego code.

I have hooked this into all the places that previously used the
RAW_SESSSETUP_GENERIC method, and have removed the old
RAW_SESSSETUP_GENERIC code from clisession.c and clitree.c. A nice
side effect is that these two modules are now very simple again, back
to being "raw" session setup handling, which was what was originally
intended.

I have also used this to replace the session setup code in the
smb_composite_connect() code, and used that to build a very simple
replacement for smbcli_tree_full_connection().

As a result, smbclient, smbtorture and all our other SMB connection
code now goes via these composite async functions. That should give
them a good workout!
(This used to be commit 080d0518bc)
2007-10-10 13:08:53 -05:00
Andrew Tridgell
1e776edfc5 r4769: added a smb_composite_connect() function that provides a simple async
interface to a complete SMB connection setup. Internally it does:

  - socket connection
  - session request (if needed)
  - negprot
  - session setup
  - tcon

This is the first example of a composite function that builds on other
composite components (the socket connection is a composite function,
which is used as a building block for this function). I think this
will be quite common in composite functions in the future, building up
ever more complex composite functions from smaller building blocks,
while hiding the details from the caller.

There are two things missing from this now. The first is async name
resolution routines (wins, bcast, DNS etc), and the second is that
this code currently only does a NT1 style session setup. I'll work on
adding spnego and old style session setup support next.
(This used to be commit 6bc9e17f5c)
2007-10-10 13:08:52 -05:00
Andrew Bartlett
b5d73bb5c5 r4764: Add some more structs to keep the proto.h compile happy.
Andrew Bartlett
(This used to be commit e5e4dd0d34)
2007-10-10 13:08:51 -05:00
Stefan Metzmacher
592fce7fb1 r4726: - use the name tcon and tid instead of conn and cnum
- make use of talloc destructors

metze
(This used to be commit 8308da6ce4)
2007-10-10 13:08:48 -05:00
Jelmer Vernooij
13b2f56f17 r4723: Predefine libnet_JoinDomain as it's used in proto.h
(This used to be commit 041bf4ee7d)
2007-10-10 13:08:48 -05:00
Andrew Tridgell
d9d41b57e9 r4717: fixed our usage of VA_COPY to be more standards compliant
(This used to be commit 48b52584ab)
2007-10-10 13:08:47 -05:00
Andrew Tridgell
287515fd3d r4710: added a smb_composite_savefile() function, and expanded the test suite a little
(This used to be commit ef4dbc443d)
2007-10-10 13:08:46 -05:00
Andrew Tridgell
1d795fa57b r4700: first attempt at a composite async function, smb_composite_loadfile(),
which combineds ntcreatex, readx and close into a single call that
behaves just like a normal libcli async call.
(This used to be commit 516f68fb05)
2007-10-10 13:08:45 -05:00
Andrew Bartlett
7ab7debcf1 r4681: Another entry for structs.h
Andrew Bartlett
(This used to be commit a3f3553cbe)
2007-10-10 13:08:42 -05:00
Andrew Bartlett
462ef44745 r4673: Fix the IDL for the QuerySecret LSA call.
This call uses a new IDL type, NTTIME_hyper.  This is 8-byte aligned,
as the name suggests.

Expand the QuerySecret LSA calls in RPC-SAMLOGON and RPC-LSA, to
validate the behaviour of times, and of the old secrets.

Thanks to tridge for spotting the use of HYPER!

Andrew Bartlett
(This used to be commit 1fed79cb0f)
2007-10-10 13:08:40 -05:00
Stefan Metzmacher
fd4831f1f0 r4650: - make more use of bitmap and enum's
- move some structs out of misc.idl

metze
(This used to be commit b6543a6e30)
2007-10-10 13:08:39 -05:00
Andrew Tridgell
577218b2ad r4640: first stage in the server side support for multiple context_ids on one pipe
this stage does the following:

 - simplifies the dcerpc_handle handling, and all the callers of it

 - split out the context_id depenent state into a linked list of established contexts

 - fixed some talloc handling in several rpc servers that i noticed while doing the above
(This used to be commit fde042b3fc)
2007-10-10 13:08:38 -05:00
Volker Lendecke
fd9a4436c0 r4622: Clarify a comment a bit
(This used to be commit e76d486b04)
2007-10-10 13:08:35 -05:00
Stefan Metzmacher
46a32687da r4620: - add interface functions to the auth subsystem so that callers doesn't need to
use function pointers anymore
- make the module init much easier
- a lot of cleanups

don't try to read the diff in auth/ better read the new files

it passes test_echo.sh and test_rpc.sh

abartlet: please fix spelling fixes

metze
(This used to be commit 3c0d16b823)
2007-10-10 13:08:34 -05:00
Andrew Tridgell
e74b3ed6f1 r4618: - tidied up the alter_context client code a bit
- there is no alter_nak or alter_ack packet, its all done in an
  alter_response

- auto-allocated the contex_ids

- tried to fix up the dcom code to work again with
  alter_context. Jelmer, please take a look :)
(This used to be commit dd1c54add8)
2007-10-10 13:08:34 -05:00
Stefan Metzmacher
e0b0d934ec r4607: add some usefull macros to make the code more readable
metze
(This used to be commit 62c45635ff)
2007-10-10 13:08:32 -05:00
Andrew Tridgell
11ce2cfd70 r4591: - converted the other _p talloc functions to not need _p
- added #if TALLOC_DEPRECATED around the _p functions

- fixes the code that broke from the above

while doing this I fixed quite a number of places that were
incorrectly using the non type-safe talloc functions to use the type
safe ones. Some were even doing multiplies for array allocation, which
is potentially unsafe.
(This used to be commit 6e7754abd0)
2007-10-10 13:08:30 -05:00
Andrew Tridgell
9278473ea4 r4589: forgot to commit the new NT_STATUS_RPC_PROTSEQ_NOT_SUPPORTED error code
(This used to be commit f4337c988c)
2007-10-10 13:08:30 -05:00
Andrew Tridgell
65f96eba32 r4473: - moved talloc into its own lib/talloc/ area
- added gcov flags to Makefile.talloc

- expanded talloc testsuite to add a test for realloc with a child ptr

- fixed a bug in talloc_realloc() with realloc of a ptr that has child ptrs
(This used to be commit 98b5f73c1b)
2007-10-10 13:07:55 -05:00
Stefan Metzmacher
7ac62a7b13 r4435: add another error code
metze
(This used to be commit 02861f6305)
2007-10-10 13:07:49 -05:00
Stefan Metzmacher
cb25806d8d r4431: add WERR_NET_NAME_NOT_FOUND
metze
(This used to be commit 74e65680fa)
2007-10-10 13:07:48 -05:00
Stefan Metzmacher
c4e152850d r4421: fix typo
metze
(This used to be commit 222abd4171)
2007-10-10 13:07:47 -05:00
Stefan Metzmacher
2c34148db5 r4420: - add usefull helper macros for allocation failures,
they should be used in mostly all our code after
  calling a talloc_* function

- the current NTSTATUS_TALLOC_CHECK() and WERR_TALLOC_CHECK()
  should be replaced by this new macros

metze
(This used to be commit b6376590f4)
2007-10-10 13:07:47 -05:00
Stefan Metzmacher
b5b1c52a98 r4419: move security_token stuff to the libcli/security/
and debug privileges

metze
(This used to be commit c981808ed4)
2007-10-10 13:07:47 -05:00
Stefan Metzmacher
25715e32f0 r4418: fix compiler warning and remove unused typedef
metze
(This used to be commit 5861657fd1)
2007-10-10 13:07:47 -05:00
Jelmer Vernooij
f05bc12213 r4390: Registry value and key names are case-insensitive
Nicer menu layout in gregedit
(This used to be commit 2948b9750d)
2007-10-10 13:07:42 -05:00
Andrew Tridgell
92152aa006 r4387: added a TODO about the NTCREATEX_FLAGS_OPEN_DIRECTORY flag - it seems to open
the parent of the specified directory ?!
(This used to be commit a012d1c978)
2007-10-10 13:07:41 -05:00
Andrew Bartlett
d5fd599678 r4379: Merge more Kerberos related configure checks (by jra, gd and Lars
Mueller <lmuelle@suse.de>) from 3.0 to Samba4.

Andrew Bartlett
(This used to be commit 9c74e04098)
2007-10-10 13:07:40 -05:00
Andrew Tridgell
5e4e61c827 r4364: - added support for testing of chained SMB operations in smbtorture
- added test for chained OpenX/ReadX, simulating the OS/2 workplace shell

- fixed a bug in handling chained fnum in openx and ntcreatex in the server

(yes, I'm on holiday, but this bug was annoying me ....)
(This used to be commit b3b8958a18)
2007-10-10 13:07:38 -05:00
Andrew Bartlett
44113c4de1 r4355: More work from the elves on Christmas eve:
- Update Samba4's kerberos code to match the 'salting' changes in
   Samba3 (and many other cleanups by jra).

 - Move GENSEC into the modern era of talloc destructors.  This avoids
   many of the memory leaks in this code, as we now can't somehow
   'forget' to call the end routine.
  - This required fixing some of the talloc hierarchies.

 - The new krb5 seems more sensitive to getting the service name
   right, so start actually setting the service name on the krb5 context.

Andrew Bartlett
(This used to be commit 278bf1a61a)
2007-10-10 13:07:37 -05:00
Stefan Metzmacher
c533379c90 r4328: mark the talloc data as DATA_BLOB
metze
(This used to be commit ad84e3b2e3)
2007-10-10 13:07:35 -05:00
Stefan Metzmacher
e0cac67fd4 r4324: add some more ads constants before I forget them
metze
(This used to be commit 705af52cb1)
2007-10-10 13:07:35 -05:00
Jelmer Vernooij
616cf70128 r4298: Update to credentials.h after feedback from Andrew Bartlett
Move pack/unpack of values in ldb registry backend to seperate functions
(This used to be commit ceb4e92735)
2007-10-10 13:07:32 -05:00
Andrew Tridgell
ed42a64901 r4263: added support for the trans2 RAW_SEARCH_EA_LIST information
level. This is quite a strange level that we've never seen before, but
is used by the os2 workplace shell.

note w2k screws up this level when unicode is negotiated, so it only
passes the RAW-SEARCH test when you force non-unicode
(This used to be commit 25189b8fbf)
2007-10-10 13:07:29 -05:00
Andrew Tridgell
b706555b3a r4261: added the RAW_FILEINFO_EA_LIST trans2 qfileinfo and qpathinfo
level. Interestingly, this level did now show up on our trans2 scanner
previously as we didn't have the FLAGS2_EXTENDED_ATTRIBUTES bit set in
the client code. Now that we set that bit, new levels appear in
windows servers.
(This used to be commit 0b76d405a7)
2007-10-10 13:07:29 -05:00
Andrew Tridgell
3b8e83a8c8 r4243: a sniff from kukks showed that the ea_set interface in trans2 setfileinfo allows
for multiple EAs to be set at once. This fixes all the ea code to allow for that.
(This used to be commit b26828bef5)
2007-10-10 13:07:28 -05:00
Jelmer Vernooij
d8c3428b3b r4209: Fix several smaller bugs
Add "predef" and "set" commands in regshell

Some of the remote calls from a Windows box work now.
(This used to be commit f3e0578280)
2007-10-10 13:07:27 -05:00
Jelmer Vernooij
1a340869c4 r4204: Arguments to reg_del_key more like the RPC for more efficient usage
Fix small bug in regpatch
Fix segfault in regshell cmdline completion
Implement set_value and del_value in ldb backend
(This used to be commit 8e2aa58abe)
2007-10-10 13:07:26 -05:00
Stefan Metzmacher
a7c70d4c5e r4177: add some more error codes
metze
(This used to be commit e624bb5288)
2007-10-10 13:07:23 -05:00
Andrew Tridgell
fbd8c61ff7 r4173: - new t2open code, that can cope with "create with EAs". Many thanks
to kukks on #samba-technical for the sniffs that allowed me to work
  this out

- much simpler ntvfs open generic mapping code

- added t2open create with EA torture test to RAW-OPEN test
(This used to be commit a56d95ad89)
2007-10-10 13:07:22 -05:00
Jelmer Vernooij
47fa1d33e4 r4166: More small API fixes, keep registry structs as small as possible.
Implement DelValue in the RPC server
(This used to be commit f6b9ec89af)
2007-10-10 13:07:21 -05:00
Jelmer Vernooij
969e14eae9 r4155: More destinction between hives and predefined keys
(This used to be commit c37d6f3c58)
2007-10-10 13:07:20 -05:00
Jelmer Vernooij
6cf13f4d72 r4154: Add definitions for HKEY_PERFORMANCE_TEXT and HKEY_PERFORMANCE_NLSTEXT
Hives and predefined keys (HKEY_*) are not necessarily the same thing.
(This used to be commit 217e4e5841)
2007-10-10 13:07:19 -05:00
Andrew Tridgell
6ca874f71a r4147: converted from NT_USER_TOKEN to struct security_token
this is mostly just a tidyup, but also adds the privilege_mask, which
I will be using shortly in ACL checking.

note that I had to move the definition of struct security_token out of
security.idl as pidl doesn't yet handle arrays of pointers, and the
usual workaround (to use a intermediate structure) would make things
too cumbersome for this structure, especially given we never encode it
to NDR.
(This used to be commit 7b446af09b)
2007-10-10 13:06:31 -05:00
Jelmer Vernooij
f0eff2525b r4140: Get rid of close_hive (replace it with talloc destructors).
(This used to be commit bcbfce7b01)
2007-10-10 13:06:30 -05:00
Jelmer Vernooij
a9fa37d618 r4137: Make *_open_key take a registry_key instead of a hive (more efficient
in some cases)
(This used to be commit ddf7a331c5)
2007-10-10 13:06:30 -05:00
Jelmer Vernooij
444a867924 r4132: - Bunch of rather large fixes in the registry
- Added some README files

Not everything works yet, e.g. the EnumValue test appears to be broken.
(This used to be commit c169e86c1f)
2007-10-10 13:06:29 -05:00
Andrew Tridgell
60c69445f6 r4124: include locale.h to get LC_ALL in include/system/iconv.h
(This used to be commit 573230ea99)
2007-10-10 13:06:28 -05:00
Stefan Metzmacher
4b7960a091 r4084: add some more error codes
metze
(This used to be commit e5db585268)
2007-10-10 13:06:25 -05:00
Andrew Tridgell
ad3ee0a81c r4073: - added a set of lsa helper routines to make lsa lookups that are
related to filesharing. For example, in order to manipulate ACLs
  properly its important to be able to call LookupSids, and to be able
  to lookup what privileges a SID has.

- added 3 new commands to smbclient "lookupname", "lookupsid" and
  "privileges"
(This used to be commit 8780c40f05)
2007-10-10 13:06:23 -05:00
Stefan Metzmacher
f99c93ec57 r4070: move some defines from asn_1.h to the places they belong to
metze
(This used to be commit ab2c2f27e1)
2007-10-10 13:06:22 -05:00
Stefan Metzmacher
9112a632f6 r4063: - change char * -> uint8_t in struct request_buffer
- change smbcli_read/write to take void * for the buffers to match read(2)/write(2)

all this fixes a lot of gcc-4 warnings

metze
(This used to be commit b94f92bc66)
2007-10-10 13:06:21 -05:00
Andrew Tridgell
2f9e170f45 r4058: added a type safe version of smb_xmalloc()
(This used to be commit 1235afa5fe)
2007-10-10 13:06:20 -05:00
Andrew Tridgell
6e6374cb5b r4055: fixed more places to use type safe allocation macros
(This used to be commit eec698254f)
2007-10-10 13:06:20 -05:00
Andrew Tridgell
450368c833 r4033: removed a pointless comment
(This used to be commit 1f3f9f8294)
2007-10-10 13:06:16 -05:00
Andrew Tridgell
bb291f184e r4014: removed unused MacExtension.h header
(This used to be commit 5ffffdd79f)
2007-10-10 13:06:15 -05:00
Andrew Tridgell
607e302238 r4013: got rid of a bunch of unused or unmaintained code
- removed the clitar code. It is unmaintained, and a horribly badly done hack

 - removed client.h as it contained mostly unused definitions

 - removed the unused clidfs.c code
(This used to be commit 31a7bddbb3)
2007-10-10 13:06:15 -05:00
Andrew Tridgell
fdc9f417d8 r4011: get rid of rpc_secdes.h and replace it with a single sane set of
definitions for security access masks, in security.idl

The previous definitions were inconsistently named, and contained many
duplicate and misleading entries. I kept finding myself tripping up
while using them.
(This used to be commit 01c0fa722f)
2007-10-10 13:06:13 -05:00
Andrew Tridgell
d019557a53 r3975: added LFN filesystem attribute bit definition from ethereal
apologies for not committing this earlier
(This used to be commit 0950681091)
2007-10-10 13:06:10 -05:00
Andrew Tridgell
f2a605eeab r3939: - added "posix:fakeoplocks" option for testing with oplocks forced on
- added support for sticky write times after a setfileinfo, by using a
  write_time field in the DosAttrib xattr structure.
(This used to be commit 4a52fae82d)
2007-10-10 13:06:06 -05:00
Stefan Metzmacher
3129264308 r3910: add some error codes
metze
(This used to be commit 64570b7a47)
2007-10-10 13:06:05 -05:00
Stefan Metzmacher
717c8bc795 r3869: in the NDR encoded replPropertyMetaData attribute in ADS
I see a new 64 bit time field which are seconds since 1601,

this will be mapped to NTTIME by th eparsing code

+#define NTTIME_1sec NTTIME

metze
(This used to be commit db35f3b0f9)
2007-10-10 13:05:59 -05:00
Andrew Tridgell
82da254ece r3833: NTACL is a better xattr name than DosAcl (tpot suggested this)
(This used to be commit 17911eea59)
2007-10-10 13:05:58 -05:00
Andrew Tridgell
bc7b4abc3a r3832: added NT ACL query/set to the posix NTVFS backend. The default ACL is
based on the current nttoken, which is completely wrong, but works as a start.

The ACL is stored in the xattr system.DosAcl, using a NDR encoded IDL
union with a version number to allow for future expansion.

pvfs does not yet check the ACL for file access. At the moment the ACL
is just query/set.

We also need to do some RPC work to allow the windows ACL editor to be
used. At the moment is queries the ACL fine, but displays an error
when it fails to map the SIDs via rpc.
(This used to be commit 3a1f20d874)
2007-10-10 13:05:57 -05:00