1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

73433 Commits

Author SHA1 Message Date
Andreas Schneider
f086057ce8 s3-rpc_server: Remove syntax from pipes_struct. 2011-06-01 12:02:16 +02:00
Andreas Schneider
751ecd9bf7 s3-rpc_server: Fixed debug messages of srv_pipe_hnd. 2011-06-01 12:02:15 +02:00
Andreas Schneider
9f1b20e971 s3-rpc_server: Fixed debug messages for rpc_handles. 2011-06-01 12:02:15 +02:00
Andreas Schneider
89ced2cc49 s3-rpc_server: Fix debug messages. 2011-06-01 12:02:15 +02:00
Andreas Schneider
e744222e41 s3-rpc_server: Don't segfault if there are not handles to free. 2011-06-01 12:02:15 +02:00
Andreas Schneider
438b24a77f s3-rpc_server: Remove guessing of the syntax id.
This is only a wild guess. We don't know to which rpc service the client
wants to talk until we read the the rpc bind packet.
2011-06-01 12:02:15 +02:00
Andreas Schneider
7d800a8694 s3-rpc_server: Use the correct syntax id for debugging. 2011-06-01 12:02:15 +02:00
Andreas Schneider
6b0f82eeab s3-rpc_server: Migrate init_pipe_handles() to new syntax. 2011-06-01 12:02:15 +02:00
Andreas Schneider
58485afd91 s3-rpc_server: Use the context syntax id in api_pipe_request(). 2011-06-01 12:02:15 +02:00
Andreas Schneider
c8ec695cb3 s3-rpc_server: Use the correct syntax id in api_pipe_bind_req(). 2011-06-01 12:02:15 +02:00
Andreas Schneider
6e8c7d0834 s3-rpc_server: Use the correct context syntax. 2011-06-01 12:02:15 +02:00
Andreas Schneider
34a600a27f s3-rpc_server: Move the context functions to own file. 2011-06-01 12:02:15 +02:00
Andreas Schneider
e39e09ffb5 s3-rpc_server: Store the ndr syntax id in the pipe context.
The client tell us in the rpc bind to which rpc service it wants to
connect. We did set the p->syntax earlier by guessing to which pipe name
it connects, but we don't know to which rpc service it wants to bind
until we read the first packet.
2011-06-01 12:02:15 +02:00
Andreas Schneider
44fb1140bb s3-rpc_server: Added syntax id to pipe_rpc_fns struct. 2011-06-01 12:02:15 +02:00
Rusty Russell
e340cd83f8 lib/tevent/tevent.h: minor documentation fix.
The usecs arguments are (of course) microseconds, not milliseconds.
This was added by Andreas Schneider in 6c1bcdc2 (tevent: Document the
tevent helper functions.).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Wed Jun  1 11:47:38 CEST 2011 on sn-devel-104
2011-06-01 11:47:38 +02:00
Rusty Russell
c29069e079 libcli/cldap/cldap.c: don't hand huge values to tevent_timeval_add usecs
state->request.delay is two million here, resulting in an invalid timeval.
Since tevent doesn't have a convenient wrapper to add arbitrary usecs,
do the arithmetic here (it's the sole caller of this function).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-01 10:38:47 +02:00
Rusty Russell
0204ae6229 lib/util/time.c: timeval_current_ofs_usec
Several places want "microseconds from current time", and several were
simply handing "usecs" values which could be over a million.

Using a helper to do this is safer and more readable.

I didn't replace any obviously correct callers (ie. constants).

I also renamed wait_nsec in source3/lib/util_sock.c; it's actually
microseconds not nanoseconds (introduced with this code in Volker's
19b783cc Async wrapper for open_socket_out_send/recv).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-01 10:38:47 +02:00
Rusty Russell
56e72337b0 lib/util/time.c: timeval_current_ofs_msec
Several places want "milliseconds from current time", and several were
simply doing "msec * 1000" which can (and does in one place) result in
a usec value over 1 a million.

Using a helper to do this is safer and more readable.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-01 10:38:47 +02:00
Andrew Tridgell
9bd695c83f samba-tool: update tests for new 'user enable' syntax
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Jun  1 10:37:50 CEST 2011 on sn-devel-104
2011-06-01 10:37:50 +02:00
Andrew Tridgell
1bc1ac0d08 samba-tool: improved error handling in user setexpiry 2011-06-01 17:24:36 +10:00
Andrew Tridgell
7b3d8b6c90 samba-tool: improved user enable error handling 2011-06-01 17:24:36 +10:00
Theresa Halloran
23177b5f44 s4:samba-tool: Move samba-tool setexpiry to samba-tool user setexpiry <user>
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-01 17:24:36 +10:00
Theresa Halloran
726ee12bb4 s4/samba-tool: Move samba-tool enableaccount to samba-tool user enable command.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-01 17:24:36 +10:00
Andrew Tridgell
f725e2b64e build: fixed a problem with installing scripts in the build tree
the SAMBA_SCRIPT() function was not always triggering correctly. The
base problem was that we were using a target outside the build
tree. This implements a simpler solution where we just create the
links directly in SAMBA_SCRIPT() rather than creating a waf task

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Jun  1 06:50:04 CEST 2011 on sn-devel-104
2011-06-01 06:50:04 +02:00
Andrew Bartlett
5a8218b147 s3-param Make lp_ncalrpc_dir() const
This disables % substitutions in the 'ncalrpc dir' parameter.  This is
used as a communication point between multiple parts of the codebase,
and needs to be internally consistent between all the Samba tasks.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Jun  1 05:30:53 CEST 2011 on sn-devel-104
2011-06-01 05:30:53 +02:00
Andrew Bartlett
b9d61ef55a s3-param Make lp_dedicated_keytab_file() const
This disables % substitutions in the 'dedicated keytab file' parameter.

Andrew Bartlett
2011-06-01 04:19:06 +02:00
Andrew Bartlett
edc3041093 s3-param Make lp_realm() const
This disables % substitutions in the 'realm' parameter.  This is
used all over the codebase, and needs to be internally consistent
between all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
860b43737c s3-param Make lp_name_resolv_order() const
This disables % substitutions in the 'name resolv order' parameter.  This is
used all over the codebase, and needs to be internally consistent
between all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
08a72f3a15 s3-param Make lp_utmpdir() and lp_wtmpdir const
This disables % substitutions in the 'utmp dir' and 'wtmp dir'
parameters.  These are system paths, and need to be consistent between
all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
47ece3f897 s3-param Make lp_piddir() const
This disables % substitutions in the 'pid dir' parameter.  This is
used all over the codebase, and need to be internally consistent
between all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
a0758bb5e5 s3-param Make lp_cachedir() const
This disables % substitutions in the 'cache dir' parameter.  This is
used all over the codebase, and need to be internally consistent
between all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
9aef68f4c2 s3-param Make lp_statedir() const
This disables % substitutions in the 'state dir' parameter.  This is
used all over the codebase, and need to be internally consistent
between all the Samba tasks.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
5f176378a8 s3-param Make lp_lockdir() const
This disables % substitutions in the 'lock dir' parameter.  This is
used all over the codebase, and needs to be internally consistent
for the life of the process, as they determine the location of
our locking databases.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
f331936db2 s3-param Make lp_smb_passwd_file() and lp_private_dir() const
This disables % substitutions in the 'smb passwd file' and 'private
dir' parameters.  These are used all over the codebase, and need to be
internally consistent for the life of the process, as they determine
the location of secrets.tdb, as well as the passdb databases.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
a74e7fbc6a s3-param Make lp_smb_ports() const
It makes no sense to have a % substiution in the 'smb ports' parameter.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
f52b97a129 s3-param Make charset parameters const
This removes the dangerous ability for these parameters to change
based on % substitutions.

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
ec9ff19e60 s3-param Make lp_passwordserver() const.
This means that it no longer takes % substituations, and so the documentation for this behaviour is removed from the smb.conf manpage.  (This mode is only useful in security=server, which is already marked as deprecated in 3.6).

Andrew Bartlett
2011-06-01 04:19:05 +02:00
Andrew Bartlett
7630e73dac s3-param prepare for some lp_ functions to return const 2011-06-01 04:19:05 +02:00
Jeremy Allison
c7d2f6d35a Remove the char * argument from the SMB_VFS_GETWD() call. Now always
returns malloc'ed memory.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Jun  1 04:06:12 CEST 2011 on sn-devel-104
2011-06-01 04:06:12 +02:00
Jeremy Allison
1cee71713f Change sys_getcd() to take no arguments and always return malloc'ed memory (or NULL).
Part of the efforts to remove PATH_MAX on modern systems.
2011-06-01 02:54:51 +02:00
Jeremy Allison
5abab13851 Add check for the getcwd function being able to take NULL,0 arguments. 2011-06-01 02:54:51 +02:00
Jeremy Allison
313bb1fb9c Split the ACE flag mapping between nfs4 and Windows
into two separate functions rather than trying to do
it inline. Allows us to carefully control what flags
are mapped to what in one place. Modification to
bug #8191 - vfs_gpfs dosn't honor ACE_FLAG_INHERITED_ACE
2011-06-01 02:54:51 +02:00
Michael Adam
697d5c08ac s3:doc: update the ldap_user_dn documentation in the idmap_ldap manpage
also extend the example with ldap_user_dn.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Jun  1 02:53:32 CEST 2011 on sn-devel-104
2011-06-01 02:53:32 +02:00
Michael Adam
74cd06b3df s3:idmap_ldap: allow creation of ldap stored mappings for explicitly configured domains.
After the preparations, this is achieved by using idmap_ldap_allocate_id_internal()
as get_new_id rw method instead of idmap_ldap_allocate_id().
2011-06-01 01:43:23 +02:00
Michael Adam
dea3ef1ab6 s3:idmap_ldap: rename idmap_ldap_get_new_id to idmap_ldap_allocate_id
This is in preparation of allowing allocating ldap based domain-specific configs.
2011-06-01 01:43:23 +02:00
Michael Adam
2de65b97b9 s3:idmap_ldap: rename idmap_ldap_allocate_id to idmap_ldap_allocate_id_internal
This is in preparation of allowing allocating ldap based domain-specific configs.
2011-06-01 01:43:23 +02:00
Luk Claes
5882d3eba3 idmap_ldap.8: Add example with readonly backend
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2011-06-01 01:43:23 +02:00
Andrew Bartlett
00577e9a3a librpc/ndr: Use converted_size to determine if NULL termination was sent
This is better than doing a strlen() on the string, as that huristic
only worked for ASCII strings.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Jun  1 01:42:22 CEST 2011 on sn-devel-104
2011-06-01 01:42:21 +02:00
Sean Finney
08abd1f5e8 librpc/ndr: add new LIBNDR_FLAG_STR_RAW8 for ndr_pull_string
Introduce a new flag, LIBNDR_FLAG_STR_RAW8, which indicates that libndr
should not attempt to convert the corresponding byte sequence, and place
the responsibility on the caller to do so later.

This is needed in cases where the string is known to be 8-bit and either
NULL terminated or of known length, but in an unspecified character set.
For example, when pulling PT_STRING8 properties from an exchange server
via libmapi + libndr, the codepage is neither known nor in the control
of the caller, and is determined by subsequent properties requested from
the server.  Therefore the client would like to fetch all properties in
one large batch, and convert the resulting strings locally.

This commit also includes some (basic) tests of each of the flags'
respective behaviors with the ndr push/pull string functions, in a new
source4 torture test suite ndr.ndr_string.

Signed-off-by: Sean Finney <seanius@seanius.net>
2011-06-01 00:30:40 +02:00
Sean Finney
c51795c747 librpc/ndr: consolidate string conversion logic in ndr_pull_string
Reduce the amount of duplicate code in ndr_pull_string by moving the
almost duplicate conversion calls and their corresponding NDR pulls and
checks to a single location.  In the place of the removed calls is logic
allowing the conversion to be generalized, and and any specific
pulls/checks that do not apply to the general case.

This is similar to what has already been done in the switch statement
for ndr_push_string.

Signed-off-by: Sean Finney <seanius@seanius.net>
2011-06-01 00:30:40 +02:00