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

4709 Commits

Author SHA1 Message Date
Volker Lendecke
a3eb0a32a9 Reorganize retrieving errors and server-sent controls
This attaches the data to the tldap_message instead of the tevent_req.

It adds tldap_ctx_lastmsg() to retrieve the last message for the users of
the sync wrappers.
2009-06-20 18:54:07 +02:00
Volker Lendecke
22cb9bdfd3 Move asn1_load_nocopy() to lib/util/asn1.c 2009-06-20 18:54:07 +02:00
Volker Lendecke
ecf8cebf32 Move asn1_blob() to lib/util/asn1.c 2009-06-20 18:54:07 +02:00
Volker Lendecke
361db18668 Add tldap_supports_control 2009-06-20 18:54:07 +02:00
Volker Lendecke
6abd9e42ff Add tldap_entry_has_attrvalue 2009-06-20 18:54:06 +02:00
Volker Lendecke
d45cf0146b tldap control support 2009-06-20 18:54:06 +02:00
Volker Lendecke
63a70ba0ad Prepare control support
We will have arrays of controls passed to tldap.c. Follow a mantra from the
classic book "Thinking Forth" by Leo Brodie: Favor counts over terminators :-)

This makes the parameter lists to tldap pretty long, but everyone will have
wrapper routines anyway, see for example tldap_search_fmt. And the OpenLDAP
manpages call the non-_ext routines deprecated, probably for a reason.
2009-06-20 18:54:06 +02:00
Volker Lendecke
f24e63af2c Fix empty lines 2009-06-20 12:15:21 +02:00
Jim McDonough
7930f15f5d Don't require "Modify property" perms to unjoin bug #6481)
"net ads leave" stopped working when "modify properties"
permissions were not granted (meaning you had to be allowed
to disable the account that you were about to delete).

Libnetapi should not delete machine accounts, as this does not
happen on win32.  The WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE flag
really means "disable" (both in practice and docs).

However, to keep the functionality in "net ads leave", we
will still try to do the delete.  If this fails, we try
to do the disable.

Additionally, it is possible in windows to not disable or
delete the account, but just tell the local machine that it
is no longer in the account.  libnet can now do this as well.
2009-06-19 13:46:07 -04:00
Volker Lendecke
0524d24fb2 Add a missing talloc_move() in tldap_search_recv 2009-06-19 17:37:30 +02:00
Volker Lendecke
b9c99a2928 Add tldap_fetch_rootdse 2009-06-19 14:28:22 +02:00
Volker Lendecke
663e841ecd Make tevent_req_is_ldap_error public 2009-06-19 14:28:22 +02:00
Volker Lendecke
5cb6bf6f9d Add tldap_context_[gs]etattr
This adds the ability to attach extended information to a tldap_context. This
will become useful once we start to do automatic reconnects for example, a
callback function might want attach a pointer to credentials so that it can
rebind.

The initial user of this will be a cached rootdse, so that things like the
ability to do paged searches can be cached.
2009-06-19 14:28:22 +02:00
Volker Lendecke
5a9ca3db03 Fix bug 4699: Remove pidfile on clean shutdown 2009-06-18 16:17:57 -07:00
Slava Semushin
89e979fe99 Fix resource leak in lib/ldb/tools/ldbmodify.c
Patch for bug #6389
2009-06-18 13:49:26 +10:00
Slava Semushin
e0caf399e1 Fix syntax error in lib/ldb/ldb_sqlite3/base160.c
Patch for bug #6388
2009-06-18 13:49:26 +10:00
Günther Deschner
29b8e08b83 s3-netapi: Fix Bug #6451: net/libnetapi user rename using wrong access bits.
Guenther
2009-06-16 15:00:20 +02:00
Günther Deschner
33be1f56f7 s3-netapi: Fix Bug #6305. Correctly prompt for a password when a username was given.
When no callback or wrapping has managed to get a password, prompt in the
netapi connection manager for a password.

Guenther
2009-06-16 12:13:53 +02:00
Günther Deschner
c033039e62 s3-netapi: add NetGetJoinInformation example code.
Guenther
2009-06-16 10:42:49 +02:00
Volker Lendecke
baa6ebddcb Add basic tracing of tldap messages 2009-06-12 15:04:21 +02:00
Volker Lendecke
a36a3e4c83 Add debugging facility to tldap, analogous to tevent 2009-06-12 15:04:21 +02:00
Andrew Kroeger
6c5c991304 s3: Call va_end() after all va_start()/va_copy() calls.
There are error paths in S3 where va_end() is not properly called after
va_start() or va_copy() have been called.

These issues were noted while performing an inspection for S4 bug #6129.  Thanks
to Erik Hovland <erik@hovland.org> for the original bug report.
2009-06-12 10:29:37 +02:00
Jeremy Allison
dc5c7b7f98 Make ctemp async. Fix the test to pass against W2K3.
Jeremy.
2009-06-10 11:58:00 -07:00
Jeremy Allison
c736baf9f8 Make open_udp_socket() IPv6 clean. Trying to fix bug #6437 - Unable to join IPv6-only ads domain.
Avaiting feedback from submitter before backport to 3.4 and earlier.
Jeremy.
2009-06-08 13:26:39 -07:00
Volker Lendecke
9b42c5ca79 Add tlda_add_mod_str 2009-06-08 21:14:10 +02:00
Günther Deschner
fb6e835543 s3-charcnv: always talloc_free in convert_string_talloc() error path.
Guenther
2009-06-08 10:44:50 +02:00
Günther Deschner
2775c52baa s3-charcnv: remove remaining malloc references in convert_string_talloc().
Guenther
2009-06-08 10:26:40 +02:00
Volker Lendecke
bee9fda243 Add tldap_pull_uint32 2009-06-07 23:14:40 +02:00
Volker Lendecke
83dee900bc Fix syntax of sending a delete request 2009-06-07 11:50:50 +02:00
Volker Lendecke
1769c8d81b Add some samba-style tldap utility functions 2009-06-06 13:10:30 +02:00
Volker Lendecke
7194937eea Add the early start of an async ldap library
There's a lot of things this does not do yet: For example it does not parse the
reply blob in the sasl bind, it does not do anything with controls yet, a lot
of the ldap requests are not covered yet. But it provides a basis for me to
play with a pdb_ads passdb module.
2009-06-06 13:10:30 +02:00
Volker Lendecke
3cd03b229b Allow AF_UNIX for open_socket_out 2009-06-06 10:42:54 +02:00
Björn Jacke
e1eb48bc6b s3: map NetBSD's errno on posix open calls for symlinks
This is well undocumented but NetBSD returns EFTYPE on O_NOFOLLOW open calls on
symlinks.
2009-06-04 22:09:10 +02:00
Björn Jacke
7cdad30b96 s3: correct check for usleep value boundaries 2009-06-03 18:06:43 +02:00
Volker Lendecke
14c1362034 Fix some nonempty blank lines 2009-05-31 12:16:34 +02:00
Volker Lendecke
29d25d5ebf Move ads flags mapping to lib/ 2009-05-30 10:21:38 +02:00
Kai Blin
57ea909b32 libwbclient: Add async call framework. 2009-05-30 09:17:37 +02:00
Volker Lendecke
dde62b35d7 Add smbldap_talloc_single_blob() 2009-05-29 21:29:24 +02:00
Volker Lendecke
e3367284ab s3 async wbclient: Change license to LGPLv3+ 2009-05-29 18:17:39 +02:00
Günther Deschner
bff54b90c3 util: move add_gid_to_array_unique to toplevel and add add_uid_to_array_unique.
Guenther
2009-05-29 13:49:58 +02:00
Volker Lendecke
0dbecbbee5 Make sid_binstring & friends take a talloc context 2009-05-28 11:33:21 +02:00
Volker Lendecke
3194ad2838 Add smbldap_pull_sid 2009-05-28 10:52:04 +02:00
Marc VanHeyningen
a4887e250b s3: Allow child processes to exit gracefully if we are out of fds
When we run out of file descriptors for some reason, every new
connection forks a child that immediately panics causing smbd to
coredump.  This seems unnecessarily harsh; with this code change we
now catch that error and merely log a message about it and exit
without the core dump.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-27 13:16:17 -07:00
Volker Lendecke
dd0506d15d Attempt to fix the build on NetBSD 2009-05-26 23:20:34 +02:00
Volker Lendecke
49ca690b4b Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STAT
This patch introduces

struct stat_ex {
        dev_t           st_ex_dev;
        ino_t           st_ex_ino;
        mode_t          st_ex_mode;
        nlink_t         st_ex_nlink;
        uid_t           st_ex_uid;
        gid_t           st_ex_gid;
        dev_t           st_ex_rdev;
        off_t           st_ex_size;
        struct timespec st_ex_atime;
        struct timespec st_ex_mtime;
        struct timespec st_ex_ctime;
        struct timespec st_ex_btime; /* birthtime */
        blksize_t       st_ex_blksize;
        blkcnt_t        st_ex_blocks;
};
typedef struct stat_ex SMB_STRUCT_STAT;

It is really large because due to the friendly libc headers playing macro
tricks with fields like st_ino, so I renamed them to st_ex_xxx.

Why this change? To support birthtime, we already have quite a few #ifdef's at
places where it does not really belong. With a stat struct that we control, we
can consolidate the nanosecond timestamps and the birthtime deep in the VFS
stat calls.

At this moment it is triggered by a request to support the birthtime field for
GPFS. GPFS does not extend the system level struct stat, but instead has a
separate call that gets us the additional information beyond posix. Without
being able to do that within the VFS stat calls, that support would have to be
scattered around the main smbd code.

It will very likely break all the onefs modules, but I think the changes will
be reasonably easy to do.
2009-05-26 17:48:23 +02:00
Michael Adam
f5a5c6a5dc s3:dbwrap_ctdb: fix some function header comments
Michael
2009-05-25 22:16:46 +02:00
Volker Lendecke
7043ef2a79 Don't limit the number of retries in wb_trans.
This is better done with a tevent_req_set_endtime the caller should issue.
2009-05-24 13:51:07 +02:00
Volker Lendecke
f528dbcf2e Don't set a timeout deep inside wb_connect 2009-05-24 13:51:01 +02:00
Volker Lendecke
4906d7fc67 Do queueing in wbclient.c
The _trigger fn must know about wbc_context, while we were waiting in the
queue the fd might have changed
2009-05-24 13:50:43 +02:00
Volker Lendecke
e337124c55 Fix closed_fd(): select returning 0 means no fd listening 2009-05-24 13:50:35 +02:00