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

5079 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
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
8d1b81926d Fix Coverity IDs 922 and 933
In copy_internals(), if the !CAN_WRITE(conn) kicks in, we end up
dereferencing a NULL smb_filename.

This adds a simple protection around it.

Tim, please check!

Volker
2009-06-19 16:25:10 +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
Jeremy Allison
d2da9dee68 Add some const to the stat struct in the dosmode calls.
Fix a couple more unix_convert uses to filename_convert.
Fix bug in acl_group_override() where an uninitialized
struct could be used. Move unix_convert with wildcard
use in SMBsearch reply to boilerplate code.
Jeremy.
2009-06-18 15:07:14 -07:00
Jeremy Allison
34267482d5 Replace the boilerplate calls to :
resolve_dfspath() -> unix_convert() -> get_full_smb_filename() -> check_name()
with a new function filename_convert().
This restores the check_name() calls that had gone missing
since the default create_file was changed. All "standard"
pathname processing now goes through filename_convert().
I'll take a look at the non-standard pathname processing
next. As a benefit, fixed a missing resolve_dfspath()
in the trans2 mkdir call.
Jeremy.
2009-06-18 13:13:38 -07:00
Tim Prouty
4e3656b8d1 s3: Change SMB_VFS_OPEN to take an smb_filename struct
This was a little messy because of all of the vfs modules I had to
touch.  Most of them were pretty straight forward, but the streams
modules required a little attention to handle smb_filename.  Since the
use of smb_filename enables the vfs modules to access the raw,
over-the-wire stream, a little bit of the handling that was being done
by split_ntfs_stream_name has now been shifted into the individual
stream modules.  It may be a little more code, but overall it gives
more flexibility to the streams modules, while also allowing correct
stream handling.
2009-06-17 20:11:53 -07:00
Tim Prouty
5cfac1a1bd s3: Plumb smb_filename from create_file all of the way down to fd_open
I used the smb_filename struct everywhere that was feasible for the
first pass.  There are still some places in this path that need to be
changed to use smb_filename, but this is a good start.

I also:
- Removed fname/path arguments from a few functions that weren't
  really using them.
- Added a utility function for detecting whether an smb_filename is a
  stream.
2009-06-17 20:11:53 -07:00
Tim Prouty
04afa4b6b5 s3: Plumb smb_filename through SMB_VFS_CREATE_FILE 2009-06-12 16:14:50 -07:00
Tim Prouty
9d7c4ad748 s3: Add smb_filename utility functions and fix a bug in copy_smb_filename 2009-06-12 16:14:44 -07:00
Volker Lendecke
a36a3e4c83 Add debugging facility to tldap, analogous to tevent 2009-06-12 15:04:21 +02:00
Tim Prouty
a9ec21cf21 s3: Prepare the first set of SMB_VFS_CREATE_FILE callers to take an smb_filename struct
Some of the callers required minimal changes, while others
(copy_internals) required significant changes.  The task is simplified
a little bit because we are able to do operations and checks on the
base_name when a stream isn't used.

This patch should cause no functional changes.

Volker, Jeremy: Please check
2009-06-10 13:13:27 -07:00
Tim Prouty
bddd7ad3dc s3: Add utility function for copying an smb_filename struct 2009-06-10 13:13:27 -07:00
Tim Prouty
5b2034f9c1 s3: Remove the now unused CFF_DOS_PATH flag
All paths are now unix paths, making this flag useless.

This flags argument is now unused and can be safely removed.
2009-06-10 13:13:27 -07:00
Jeremy Allison
dc5c7b7f98 Make ctemp async. Fix the test to pass against W2K3.
Jeremy.
2009-06-10 11:58:00 -07:00
Volker Lendecke
9b42c5ca79 Add tlda_add_mod_str 2009-06-08 21:14:10 +02:00
Volker Lendecke
a51e6ce43c Pass a talloc_ctx to pdb_enum_aliasmem 2009-06-08 21:14:10 +02:00
Timur I. Bakeyev
ab88f9017c Set SIGRTMIN to NSIG
In the includes we define SIGRTMIN to 32 if it's not defined already. This
value could be fairly low and it's better to use NSIG(number of defined
signals) as the lower mark for the available signals.

We have similar defenition in the source3/smbd/aio.c, which can be safely
removed, as it comes from includes.h then.

With regards,
Timur Bakeyev.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-06-08 13:20:52 +02:00
Volker Lendecke
bee9fda243 Add tldap_pull_uint32 2009-06-07 23:14:40 +02:00
Volker Lendecke
d8f331778f req_del and req_abandon are ASN1_APPLICATION_SIMPLE
Ok, ASN1_APPLICATION everywhere was too easy :-)
2009-06-07 11:50:48 +02:00
Volker Lendecke
35492ada90 Fix after making tldap independent of ldap.h 2009-06-07 11:29:44 +02:00
Volker Lendecke
afbe383c40 Attempt to fix the build without system-ldap.
I really tried, but I knew I would miss something... :-)
2009-06-06 15:32:30 +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
Jeremy Allison
64a1f17aff Make cli_ftruncate async. Also add a simple test.
Jeremy.
2009-06-05 16:06:05 -07:00
Stefan Metzmacher
160ead46dc s3:smbd: implement smbd_smb2_request_error/done() as macros on top of the _ex() function
metze
2009-06-05 11:31:03 +02:00
Jeremy Allison
73e3c85aba Change smbd_smb2_request_error() to add a __location__.
This allows quick identification of smb2 parsing errors.
Jeremy.
2009-06-04 12:47:17 -07:00
Stefan Metzmacher
a02265cdc4 s3:smbd: make make_connection_snum() non static
metze
2009-06-03 17:54:38 +02:00
Stefan Metzmacher
c862018008 s3:smbd: move tcon specific globals to struct smbd_server_connection
metze
2009-06-03 17:54:38 +02:00
Stefan Metzmacher
75d03970b7 s3:smbd: move more session specific globals to struct smbd_server_connection
metze
2009-06-03 17:54:37 +02:00
Stefan Metzmacher
e16e7146b3 s3:smbd: move negprot related globals to struct smbd_server_connection
metze
2009-06-03 17:54:37 +02:00
Stefan Metzmacher
f20ded603b s3:smbd: move pending_auth_data list to struct smbd_server_connection
metze
2009-06-03 17:54:36 +02:00
Volker Lendecke
56efcb7b72 Add SMB_VFS_CONNECTPATH operation
This is required for the shadow_copy2 module and "wide links = no". The file
system snapshots by nature are typically outside of share directory. So the
REALPATH result fails the wide links = no test.
2009-06-02 11:58:22 +02:00
Volker Lendecke
14c1362034 Fix some nonempty blank lines 2009-05-31 12:16:34 +02:00
Kai Blin
57ea909b32 libwbclient: Add async call framework. 2009-05-30 09:17:37 +02:00
Jeremy Allison
684d3dddd6 Make cli_nt_delete_on_close() async.
Jeremy.
2009-05-29 14:58:34 -07:00
Michael Adam
e31d4ee936 s3:add prototype of map_nt_error_from_wbcErr() to proto.h
Michael
2009-05-29 23:28:39 +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
Kai Blin
992e861a8d s3 wbc_async: Fix copyright notice cut&paste error.
Volker created all these prototypes, I just created the file and moved them over.

Signed-off-by: Kai Blin <kai@samba.org>
2009-05-29 18:17:38 +02:00
Simo Sorce
f48e39540c Consolidate create/delete account paths in pdbedit
Use common paths like for smbpasswd, so that all utilities
behave the same way. As for smbpasswd this changes the behavior
of pdbedit to create/delete unix users is the add/delete user
scripts are provided, or ldapsam:editposix is configured.

Signed-off-by: Günther Deschner <gd@samba.org>
2009-05-29 18:03:56 +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
Jeremy Allison
9df85a9374 Make cli_posix_chown()/cli_posix_chmod() async.
Jeremy.
2009-05-28 16:15:09 -07:00
Jeremy Allison
656e86d5fa Make cli_posix_stat() async.
Jeremy.
2009-05-28 13:32:00 -07:00