1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
Commit Graph

3578 Commits

Author SHA1 Message Date
Simo Sorce
18cd6cb674 r4775: use schema_attr_cmp wrapper to check for the special dn/distinguishedName case alias 2007-10-10 13:08:53 -05:00
Andrew Bartlett
37a81aad74 r4774: It appears the SensitiveData contains the password history, as the
remaining data.  Pity - I was looking for kerberos keys :-)

Andrew Bartlett
2007-10-10 13:08:53 -05:00
Tim Potter
fd14622d13 r4773: Handle arrays of scalar types as function arguments.
Add hf for function return value.

Rename struct field members to be named after the structure name
and element name rather than element name and element type.

Remember which structure or function we are processing and use it
to generate hf fields according to the naming scheme above.
2007-10-10 13:08:53 -05:00
Andrew Tridgell
0d31523aae r4772: fixed checking of the conformant size for dom_sid2 2007-10-10 13:08:53 -05:00
Tim Potter
b2a3b02216 r4771: Fix some indentation. 2007-10-10 13:08:52 -05:00
Tim Potter
75b6df15f2 r4770: Change from processing ndr_*.[ch] files all at once to line-by-line.
I'm hoping this will allow better mapping hf fields to the structures
they are present in which isn't possible at the moment.  (Line mode
allows us to use /foo/ .. /bar/ regexps and to store state during the
processing.
2007-10-10 13:08:52 -05:00
Andrew Tridgell
6bc9e17f5c 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.
2007-10-10 13:08:52 -05:00
Andrew Bartlett
3d3063b1f6 r4768: Until I can prove it, we should not have these elements marked as
size_is() base arrays.

Andrew Bartlett
2007-10-10 13:08:52 -05:00
Andrew Tridgell
b193a9cb0c r4767: handle the different NBT session request refusals, and map them to
reasonable NT_STATUS values
2007-10-10 13:08:52 -05:00
Andrew Bartlett
a43f7392f7 r4766: Add another useful helper function: samdb_msg_set_value()
Andrew Bartlett
2007-10-10 13:08:51 -05:00
Andrew Tridgell
db43807170 r4765: simplify the async socket code to always go via the event handler
rather than short-circuiting in the unlikely event the OS returns an
immediate success on a non-blocking connect
2007-10-10 13:08:51 -05:00
Andrew Bartlett
e5e4dd0d34 r4764: Add some more structs to keep the proto.h compile happy.
Andrew Bartlett
2007-10-10 13:08:51 -05:00
Andrew Bartlett
feca96fe5a r4763: Join Samba4 to itself during the provision process.
Andrew Bartlett
2007-10-10 13:08:51 -05:00
Andrew Bartlett
54a231780e r4762: Store the results of a 'net join' in the LDB.
Like Samba3, the storage of the primary domain password is keyed off
the domain name, so we can join multiple domains, and just swap
'workgroup =' around.

Andrew Bartlett
2007-10-10 13:08:51 -05:00
Simo Sorce
8c11038d67 r4759: use ldb_attr_cmp() to compare attribute names
check required attributes are not deleted on modify operation
if the objectclass is deleted then deny the operation if
orphan atributes are left behind
2007-10-10 13:08:51 -05:00
Andrew Tridgell
71cbe28734 r4758: - added async support to the session request code
- added async support to the negprot client code

- removed two unused parameters from smbcli_full_connection() code

- converted smbclient to use smbcli_full_connection() rather than
  reinventing everything itself
2007-10-10 13:08:50 -05:00
Andrew Tridgell
468f8ebbfd r4757: added the ability of the clisocket level of libcli to handle async
socket connections. This was complicated by a few factors:

 - it meant moving the event context from clitransport to clisocket,
   so lots of structures changed

 - we need to asynchronously handle connection to lists of port
   numbers, not just one port number. The code internally tries each
   port in the list in turn, without ever blocking

 - the man page on how connect() is supposed to work asynchronously
   doesn't work in practice (now why doesn't this surprise me?). The
   getsockopt() for SOL_ERROR is supposed to retrieve the error, but
   in fact the next (unrelated) connect() call on the same socket also
   gets an error, though not the right error. To work around this I
   need to tear down the whole socket between each attempted port. I
   hate posix.

Note that clisocket.c still does a blocking name resolution call in
smbcli_sock_connect_byname(). That will be fixed when we add the async
NBT resolution code.

Also note that I arranged things so that every SMB connection is now
async internally, so using plain smbclient or smbtorture tests all the
async features of this new code.
2007-10-10 13:08:50 -05:00
Andrew Tridgell
d2f76c3671 r4756: a slight tidy up in the events code 2007-10-10 13:08:50 -05:00
Andrew Tridgell
cae7748d67 r4755: the recent change in the definition of lp_passwordserver() breaks this
old code, so I'm just removing it, as it needs replacing anyway
2007-10-10 13:08:50 -05:00
Andrew Tridgell
4f6055b4fb r4754: tidied up the composite function infrastructure to make it easier to
have composite functions that are not made up of functions that
operate on smbcli_request structures.
2007-10-10 13:08:50 -05:00
Andrew Tridgell
b787dd166f r4753: added the ability for the generic socket library to handle async
connect(). This required a small API change (the addition of
a socket_connect_complete() method)
2007-10-10 13:08:50 -05:00
Andrew Tridgell
31919995fd r4748: removed unnecessary distinguishedName from provisioning 2007-10-10 13:08:49 -05:00
Andrew Tridgell
e9dff03f79 r4745: remove the distinguishedName attribute adds from samr. See the
discussion on samba-technical about this.
2007-10-10 13:08:49 -05:00
Andrew Tridgell
7893251456 r4744: until we decide what to do about attribute aliasing (see my recent
samba-technical posting), this is an interim solution that makes us
work pretty much like w2k3 does.
2007-10-10 13:08:49 -05:00
Stefan Metzmacher
9ea9e1ced5 r4730: remove unused struct elements
part of this went in in the last commit...

metze
2007-10-10 13:08:49 -05:00
Stefan Metzmacher
5190f60ded r4729: add dummy "winbind" service
- this creates a new task and then starts a process_model "single"
  with service "winbind_task"

- that means with -M single everything is in one process

  with - M standard winbind is a seperate process but didn't fork for each connection
  with -M thread winbind is a seperate thread but didn't thread for each connection

- the dummy server listen s on /tmp/.winbind/echo
  and for better testing with telnet also on 127.0.255.1 port 55555

metze
2007-10-10 13:08:49 -05:00
Stefan Metzmacher
d5fa02746c r4728: split up server_services into:
- stream_socket services
  the smb, ldap and rpc service which sets up a srtam socket end then
  waits for connections
and
- task services
  which this you can create a seperate task that do something
  (this is also going through the process_model subsystem
  so with -M standard a new process for this created
  with -M thread a new thread ...

I'll add datagram services later when we whave support for datagram sockets in lib/socket/

see the next commit as an example for service_task's

metze
2007-10-10 13:08:49 -05:00
Stefan Metzmacher
05c3d1c4a6 r4727: add a reference to the event context
to that the destructor don't double free the registered events
when the event context is first in the talloc_free() hierarchie

fixes a bug with process_model_thread and the talloc_steal(conn, ev)

metze
2007-10-10 13:08:49 -05:00
Stefan Metzmacher
8308da6ce4 r4726: - use the name tcon and tid instead of conn and cnum
- make use of talloc destructors

metze
2007-10-10 13:08:48 -05:00
Stefan Metzmacher
5287ec0818 r4725: make "password server" a string list
metze
2007-10-10 13:08:48 -05:00
Jelmer Vernooij
041bf4ee7d r4723: Predefine libnet_JoinDomain as it's used in proto.h 2007-10-10 13:08:48 -05:00
Andrew Bartlett
a9b9606091 r4722: Start to add 'net join' to Samba4.
Andrew Bartlett
2007-10-10 13:08:48 -05:00
Andrew Bartlett
f1dd179a50 r4721: Changes to libnet_passwd to take advantage of the new easier to call
RPC client libs, and to make the fallback between the various SAMR
levels easier to manage.

I'm starting to enjoy the structure that libnet has actually, and I'm
about to build 'net join' on that basis (and I didn't want to have to
duplicate the password set code).

Andrew Bartlett
2007-10-10 13:08:48 -05:00
Andrew Bartlett
d360f30948 r4720: Reformat, rename, and convert to enums parts of the LSA IDL specification.
Andrew Bartlett
2007-10-10 13:08:48 -05:00
Andrew Tridgell
8033ef6b71 r4719: snprintf.c is used outside of samba, so don't use our special types 2007-10-10 13:08:48 -05:00
Andrew Tridgell
603ef69be0 r4718: don't use the deprecated __va_copy() unless va_copy() is unavailable 2007-10-10 13:08:47 -05:00
Andrew Tridgell
48b52584ab r4717: fixed our usage of VA_COPY to be more standards compliant 2007-10-10 13:08:47 -05:00
Stefan Metzmacher
d72760d26f r4716: add a real ugly hack to get all ldap queries of an
w2k3 dc join working

I just commit that to not lose it if my home box would crash...

you need a hacked.ldb with some stuff in it, I'll explain later

and you need --option="ldapsrv:hacked=yes"

so what is left now is KRB5 support for DCERPC in the server
as the EVENT LOG of w2k3 says...

metze
2007-10-10 13:08:47 -05:00
Stefan Metzmacher
29bc75ba28 r4715: alwys add the distinguishedName attribute
the w2k3 dc join needs that

metze
2007-10-10 13:08:47 -05:00
Simo Sorce
a681ae365f r4714: move the ldb code to the new talloc interface (eg remove _p suffix)
this helps standalone building of ldb

renew the schema module
split code into functions to improve readability and code reuse

add and modify works correctly but we need a proper testsuite

Simo
2007-10-10 13:08:47 -05:00
Andrew Bartlett
175ae7599e r4713: Add initial support for QueryTrustedDomainInfo on LSA.
(more info levels to come)

Andrew Bartlett
2007-10-10 13:08:47 -05:00
Andrew Tridgell
20ab5bed34 r4712: slight tidy up in alter_context server 2007-10-10 13:08:47 -05:00
Andrew Tridgell
4ec47cc108 r4711: - deprecate talloc_destroy()
- expanded the talloc_realloc() test a little (I was concerned about a
  possible bug, which turned out to be an illusion)

- don't enable gcov by default in Makefile.talloc
2007-10-10 13:08:46 -05:00
Andrew Tridgell
ef4dbc443d r4710: added a smb_composite_savefile() function, and expanded the test suite a little 2007-10-10 13:08:46 -05:00
Stefan Metzmacher
7aa86445e3 r4709: fix compiler warnings
metze
2007-10-10 13:08:46 -05:00
Andrew Bartlett
cd9e795e40 r4708: Comparing with LDAP, it is clear that these 'flags' are in fact the
POSIX offset for the trusted domain.

Andrew Bartlett
2007-10-10 13:08:46 -05:00
Stefan Metzmacher
d896ac603a r4707: w2k3 don't restict passwords on
netr_ServerPasswordSet and netr_ServerPasswordSet2

so we do now

I also add a torture test for this

metze
2007-10-10 13:08:46 -05:00
Andrew Bartlett
8f47c7b02c r4706: Fix the build, after I renamed these elements in the IDL.
Andrew Bartlett
2007-10-10 13:08:45 -05:00
Stefan Metzmacher
57bf3d7a83 r4705: use an enum for reject_reason
metze
2007-10-10 13:08:45 -05:00
Andrew Bartlett
51e94fa26c r4703: Add support for EnumTrustDomain, and expand the testsuite.
Add my copyright to the SAMR server.

Andrew Bartlett
2007-10-10 13:08:45 -05:00