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

4942 Commits

Author SHA1 Message Date
Volker Lendecke
2aa0af9867 s3: get_pipe_name_from_iface -> get_pipe_name_from_syntax 2009-11-07 09:14:15 +01:00
Volker Lendecke
d415d4d32f s3: Add parameter "ctdb timeout"
When something in the cluster blocks, it can happen that we wait indefinitely
long for ctdb, just adding to the blocking condition. In theory, nothing should
block, but as someone said "In practice the difference between theory and
practice is larger than in theory". This adds a timeout parameter in seconds,
after which we stop waiting for ctdb and panic.
2009-11-05 12:05:36 +01:00
Jeremy Allison
cbafe17bb3 Remove "Protocol" as an extern, and add accessor functions.
Jeremy.
2009-11-04 15:15:50 -08:00
Volker Lendecke
b067a5e4e8 s3: Remove debug_ctx()
smbd just crashed on me: In a debug message I called a routine preparing a
string that itself used debug_ctx. The outer routine also used it after the
inner routine had returned. It was still referencing the talloc context
that the outer debug_ctx() had given us, which the inner DEBUG had already
freed.
2009-11-03 11:30:00 +01:00
Michael Adam
25bdf27eaa s3:dbwrap_ctdb: add debug message to transaction_fetch_start()
for the case that another local process has started a transaction
bewteen releasing the transaction_lock record and starting the
transaction.

Michael
2009-11-03 01:02:38 +01:00
Michael Adam
9fef6a6666 s3:dbwrap_ctdb: split combined check in two and add descriptive debug
in db_ctdb_transaction_fetch_start() for error conditions when re-fetching
the transaction_lock record inside the transaction

Michael
2009-11-03 01:02:38 +01:00
Michael Adam
f37439efd2 s3:dbwrap_ctdb: fix race condition with concurrent transactions on the same node.
In ctdb_transaction_commit(), when the trans2_commit control fails, there
is a race condition in the 1 second sleep between the local transaction_cancel
and the call to ctdb_replay_transaction(): The database is not locked, and
neither is the transaction_lock record. So another client can start and possibly
complete a new transaction in this gap, but only on the same node: The locking
of the transaction_lock record on a different node which involves migration of
the record to the other node has been disabled by introduction of the
transaction_active flag on the db which closes precisely this gap from the start
of the commit until the call to TRANS2_FINISH or TRANS2_ERROR.
But this mechanism does not cover the case where a process on the same node
tries to start a transaction: There is no obstacle to locking the transaction_lock
record because the record does not need to be migrated.

This commit closes this race condition in ctdb_transaction_fetch_start()
by using the new ctdb_ctrl_transaction_active() call to ask the local
ctdb daemon whether it has a transaction running on the database.
If so, the check is repeated until the running transaction is done.

This does introduce an additional call to the local ctdbd when starting
transactions, but it does close the (hopefully) last race condition.

Michael
2009-11-03 01:02:37 +01:00
Michael Adam
9be4d3dd4f s3:dbwrap_ctdb: add new db_ctdb_transaction_active() that calls CTDB_CONTROL_TRANS2_COMMIT
Michael
2009-11-03 01:02:37 +01:00
Michael Adam
9bd6b9d9f6 s3:dbwrap_ctdb: fix a race in starting concurrent transactions on a single node
There are two races in concurrent transactions on a single node.
One in starting a transaction and one with replay during commit.

This commit closes the first race by storing the client pid in the
transaction-lock record and comparing the stored pid against its own
pid after releasing the lock and refetching the record inside the
transaction.

Michael
2009-11-03 01:02:36 +01:00
Michael Adam
8d61b8abbc s3:dbwrap_ctdb: use db_ctdb_ltdb_fetch() inside db_ctdb_transaction_fetch_start
Michael
2009-11-03 01:02:36 +01:00
Michael Adam
0ec476fca1 s3:dbwrap_ctdb: use db_ctdb_ltdb_fetch() inside db_ctdb_transaction_fetch()
Michael
2009-11-03 01:02:36 +01:00
Michael Adam
4973ff66ac s3:dbwrap_ctdb: add a function db_ctdb_ltdb_fetch()
This fetches a record from the db and splits out the ctdb header.

Michael
2009-11-03 01:02:35 +01:00
Michael Adam
6a898348fa s3:dbrwap_ctdb: add a function db_ctdb_ltdb_store()
and use it in db_ctdb_store() and db_ctdb_transaction_store().

Michael
2009-11-03 01:02:35 +01:00
Michael Adam
d5aa758482 s3:dbwrap_ctdb: reformat a comment slightly to enhance clearness.
Michael
2009-11-03 01:02:35 +01:00
Volker Lendecke
d9bdd17522 s3: Fix a 100% CPU loop when ctdbd dies during a traverse 2009-11-02 17:02:20 +01:00
Günther Deschner
f35a1b95aa s3-gencache: restore gencache_get behavior with NULL args (with torture test).
Without this, we panic in wins_srv_is_dead() and fail to start nmbd with
wins support.

Volker, please check.

Guenther
2009-11-02 13:04:26 +01:00
Jim McDonough
f88ab1b151 s3: Fix incorrect rc check of nscd_flush_cache.
At least this only resulted in an incorrect debug message.
2009-10-29 11:11:43 -04:00
Karolin Seeger
f381faa8d6 s3: Rename new parameter "ldap ref follow" to "ldap follow referral".
This parameter will be introduced with Samba 3.5.0.

Karolin
2009-10-26 12:11:59 +01:00
Volker Lendecke
5c6944d33f s3: Remove a pointless #endif/#ifdef pair 2009-10-22 16:33:44 +02:00
Günther Deschner
a85799d5db s3-libnetapi: add nltest tool.
Guenther
2009-10-16 10:54:55 +02:00
Günther Deschner
ca19ffde80 s3-libnetapi: add I_NetLogonControl{2} example code.
Guenther
2009-10-16 10:50:29 +02:00
Günther Deschner
d308aa3de8 s3-libnetapi: add I_NetLogonControl{2} to public headers.
Guenther
2009-10-16 10:50:28 +02:00
Günther Deschner
e31c2c7eb1 s3-libnetapi: fill in I_NetLogonControl{2}_r.
Guenther
2009-10-16 10:50:28 +02:00
Günther Deschner
e8e1d60941 s3-libnetapi: add I_NetLogonControl{2} skeleton.
Guenther
2009-10-16 10:50:28 +02:00
Jeremy Allison
5cc895983d Fix valgrind memory leak in bug #6814 - Fixes for problems reported by valgrind
Jeremy.
2009-10-15 16:55:40 -07:00
Jan Engelhardt
c5d5969e24 s3/smbldap: add option to disable following LDAP refs
Fix bug #6717.
2009-10-12 11:34:58 +02:00
Simo Sorce
7bce1ab5e8 Fix builds with external tdb
Make sure we do not reference our internal tdb directly.
Let configure define what tdb.h file to use so that builds that use an
extrenal tdb do not include 2 different versions of the tdb header.
2009-10-11 09:48:53 -04:00
Abhidnya P Chirmule
ac774c4969 s3: Add access_mask to the flock VFS call 2009-10-06 18:52:06 +02:00
Günther Deschner
bbc71486a7 s3: remove unused rpcstr_pull and rpcstr_pull_talloc.
Guenther
2009-10-01 11:40:31 +02:00
Kamen Mazdrashki
0e1840b84a w32err: WERR_GROUP_NOT_FOUND renamed to WERR_GROUPNOTFOUND
In Win 32 we have
NERR_GroupNotFound which maps to WERR_GROUP_NOT_FOUND currently
and we have
ERROR_GROUP_NOT_FOUND which maps to nothing, so it is to be added

Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
2009-09-30 15:48:41 +03:00
Günther Deschner
fc1c243348 s3-util: use pull_reg_multi_sz in reg_pull_multi_sz.
Guenther
2009-09-30 00:31:17 +02:00
Günther Deschner
f8016cfee9 s3-util: add pull_reg_sz() and pull_reg_multi_sz() convenience functions.
Guenther
2009-09-30 00:30:47 +02:00
Günther Deschner
fcee9d2c97 s3-util: add push_reg_sz() and push_reg_multi_sz() convenience functions.
Guenther
2009-09-30 00:29:24 +02:00
Volker Lendecke
2185490176 s3:gencache: Add my copyright 2009-09-28 19:47:19 +02:00
Jeremy Allison
4f10aa5973 Revert 918b5a7e05. This code
should *not* return const.
Jeremy.
2009-09-24 15:42:36 -07:00
Matthias Dieter Wallnöfer
918b5a7e05 s3:util_str "str_list_make_v3" - introduce also here the "const" result
I did this to match with the default util strlist library.
2009-09-24 23:58:19 +02:00
Volker Lendecke
cd749ef8bd s3:gencache: Make gencache_del() return success for expired entries
This fixes nasty error messages from "net cache flush"
2009-09-23 18:50:33 +02:00
Volker Lendecke
aece84f22d s3:gencache: Remove some over-paranoid locking 2009-09-23 18:50:33 +02:00
Volker Lendecke
76d95b9a2d s3:gencache: Add a "was_expired" argument to gencache_get_data_blob
This is set to true if the routine returns failure due to an existing but
expired entry.
2009-09-23 18:50:33 +02:00
Stefan Metzmacher
00e378f17c s3:lib/select: don't overwrite errno in the signal handler
metze
2009-09-21 05:55:05 +02:00
Volker Lendecke
77afcad8f0 s3: Fix Coverity ID 581 -- NEGATIVE_RETURNS 2009-09-18 20:20:39 +02:00
Günther Deschner
a0d8698f65 s3-netapi: Fix Coverity #668: FORWARD_NULL.
Guenther
2009-09-16 10:30:08 +02:00
Günther Deschner
de43e39487 s3-netapi: Fix Coverity #669 FORWARD_NULL.
Guenthe
2009-09-16 10:30:01 +02:00
Günther Deschner
828b9a48fd s3-netapi: Fix Coverity #670: FORWARD_NULL.
Guenther
2009-09-16 10:29:54 +02:00
Andrew Bartlett
668470c992 libcli:nbt make the lmhosts parsing code and dependicies common
This starts the process to have Samba4 use lmhosts.

Andrew Bartlett
2009-09-15 07:42:54 -07:00
Björn Jacke
f410d23185 s3: BSD needs sys/sysctl.h included to build properly
FreeBSD (and other BSDs, too) need sys/sysctl.h inclueded to use sysctlbyname().

Thanks to Timur Bakeyev for that.
2009-09-15 06:54:31 +02:00
Michael Adam
a1cf12e1f6 s3:dbwrap_ctdb: set dmaster in ctdb_transaction_store() also when updating an existing record
not only when creating a record.

This matches commit e9194a130327d6b05a8ab90bd976475b0e93b06d from ctdb-master.

Michael
2009-09-11 15:39:53 +02:00
Günther Deschner
3c70480f3b s3-util: add get/set_cmdline_auth_info_domain to user_auth_info struct.
Guenther
2009-09-11 00:36:59 +02:00
Marc Aurele La France
7c00227f00 Fix bug 6707 - 3.4.1 segfault in parsing configs.
Fixes an occasional segfault caused by an out-of-bounds reference in config file parsing.
2009-09-10 09:52:11 -07:00
Jeremy Allison
43c766a14a Fix bug 6673 - smbpasswd does not work with "unix password sync = yes".
Revert change from 3.3 -> 3.4 with read_socket_with_timeout changed
from sys_read() to sys_recv(). read_socket_with_timeout() is called
with non-fd's (with a pty in chgpasswd.c and with a disk file in
lib/dbwrap_file.c via read_data()). recv works for the disk file,
but not the pty. Change the name of read_socket_with_timeout() to
read_fd_with_timeout() to make this clear (and add comments).
Jeremy.
2009-09-06 21:38:50 -07:00
Simo Sorce
bc081cf0cc Save and report the correct errno value. 2009-09-05 12:49:26 -04:00
Michael Adam
9f1c162e33 s3-ldb: update dlinklist.h to match main copy (lib/util/dlinklist.h)
This also removes build warnings of redefined macros
since it uses the embracing "#ifndef _DLINKLIST_H ... #endif".

Michael
2009-08-28 14:25:40 +02:00
Stefan Metzmacher
e91d5dbed0 s3:error_map: make NTSTATUS -> errno -> NTSTATUS mapping consistent for NT_STATUS_INVALID_PARAMETER
Why have we mapped EINVAL -> NT_STATUS_INVALID_HANDLE before?

metze
2009-08-27 16:45:39 +02:00
Steven Danneman
6c55518d47 s3/smbd: open the share_info.tdb on startup instead of tconx
This is a small performance optimization.  Instead of opening the tdb
on every smb connection in the forked child process, we now open it in
the parent and share the fd.

This also reduces the total fd usage in the system.
2009-08-26 16:34:10 -07:00
tprouty
3ad9d108a7 s3: Allow full_audit to play nice with smbd if it's using syslog
Explictly pass the facility from both smbd and full_audit to syslog.
Really the only major change is to not call openlog() in full_audit if
WITH_SYSLOG is defined, which implies that smbd is already using
syslog.  This allows full audit to piggy-back on the same ident as
smbd, while still differentiating the logging via the facility.
2009-08-26 10:41:54 -07:00
Zach Loafman
808a0d44f8 Allow for name array strings that don't end in a slash
Fix set_namearray to allow for strings that don't end in a slash. Also
remove unnecessary strdup()s.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-08-25 13:01:57 -07:00
Jeremy Allison
c69f92d16d Second attempt at fix for bug 6529 - Offline files conflict with Vista and Office 2003.
Confirmation from reporter that this fixes the issue in master on ext3/ext4.
Back-ports to follow.
Jeremy.
2009-08-24 20:57:37 -07:00
Jeremy Allison
7a6c979299 Use existing time_t rounding function, don't invent my own.
Jeremy.
2009-08-24 15:09:29 -07:00
Jeremy Allison
87d30a1968 Second part of fix for 6529 - Offline files conflict with Vista and Office 2003.
ext4 may be able to store ns timestamps, but the only API to *set* timestamps
takes usec, not nsec. Round to usec on set requests.
Jeremy.
2009-08-24 12:30:05 -07:00
Olaf Flebbe
5359e397ff make smbcontrol smbd ping work proper checking for arguments handle short pid_t correctly 2009-08-24 16:17:43 +02:00
Stefan Metzmacher
e8782de8fe s3:lib: setup talloc log and abort functions
metze
2009-08-24 16:30:00 +10:00
Jeremy Allison
1af0aa92b3 Fix bug 6529 - Offline files conflict with Vista and Office 2003
On filesystems that can't store less than one second timestamps,
round the incoming timestamp set requests so the client can't discover
that a time set request has been truncated by the filesystem.
Needs backporting to 3.4, 3.3, 3.2 and (even) 3.0.
Jeremy
2009-08-21 21:44:21 -07:00
Volker Lendecke
1a22baa817 s3: Add talloc_dict.[ch] 2009-08-16 12:38:19 +02:00
Stefan Metzmacher
14888c21ac s3:lib: map ECONNRESET to NT_STATUS_CONNECTION_RESET
metze
2009-08-12 13:27:58 +02:00
Jeremy Allison
c9dca82ed7 Refactor the use of create_time and change time to go
through functions. Will aid in making us pass RAW-SETFILEINFO.
Jeremy.
2009-08-10 15:07:53 -07:00
Volker Lendecke
1de9805fa3 Implement db_rbt_traverse 2009-08-08 13:44:31 +02:00
Volker Lendecke
8300b255a5 Fix some nonempty blank lines 2009-08-07 13:02:15 +02:00
Karolin Seeger
54dffbea66 s3/smbldap: Fix typo in debug message.
Karolin
2009-08-06 10:06:29 +02:00
Yannick Bergeron
c3e12444f5 Increase the max_grp value to 128 (AIX NGROUPS_MAX value) instead of 32 to allow AIX to call sys_getgrouplist only once 2009-07-31 04:34:37 -04:00
Michael Adam
ae58ff981d s3:dbwrap: add dbwrap_trans_change_int32_atomic()
A transaction wrapper for dbwrap_change_int32_atomic().

Michael
2009-07-29 16:26:29 +02:00
Michael Adam
fac81b3750 s3:dbwrap: export logic of dbwrap_change_int32_atomic into an action function
to prepare for adding a transaction wrapper to dbwrap_change_int32_atomic()

Michael
2009-07-29 16:26:28 +02:00
Michael Adam
a86e163c1b s3:dbwrap: change dbwrap_change_int32_atomic() to take int32_t, not int32
Michael
2009-07-29 16:26:27 +02:00
Michael Adam
0579438039 s3:dbwrap: add dbwrap_trans_change_uint32_atomic()
A transaction wrapper for dbwrap_change_uint32_atomic().

Michael
2009-07-29 16:26:25 +02:00
Michael Adam
14c2bc91b9 s3:dbwrap: export logic of dbwrap_change_uint32_atomic into an action function
to prepare for adding a transaction wrapper to dbwrap_change_uint32_atomic()

Michael
2009-07-29 16:26:24 +02:00
Michael Adam
6abcdaad28 s3:dbwrap: untangle assignment and check in dbwrap_change_int32_atomic()
Michael
2009-07-29 16:26:23 +02:00
Michael Adam
8b0993e085 s3:dbwrap: untangle assignemend and check in dbwrap_change_uint32_atomic()
Michael
2009-07-29 16:26:23 +02:00
Michael Adam
de2846012b s3:dbwrap: don't leak in dbwrap_change_int32_atomic().
Michael
2009-07-29 16:26:22 +02:00
Michael Adam
80abb95ead s3:dbwrap: don't leak in dbwrap_change_uint32_atomic()
Michael
2009-07-29 16:26:22 +02:00
Michael Adam
aa4e5a32a7 s3:dbwrap: change dbwrap_change_int32_atomic() to return NTSTATUS not int32.
Michael
2009-07-29 16:26:21 +02:00
Michael Adam
ded0ce8345 s3:dbwrap: change dbwrap_change_uint32_atomic() to return NTSTATUS not uint32_t.
Michael
2009-07-29 16:26:21 +02:00
Jeremy Allison
2d0cd3e53a (Hopefully) fix the problem Kai reported with
net ads leave and IPv6. Ensure all DC lookups
prefer IPv4.
Jeremy.
2009-07-28 18:02:10 -07:00
Volker Lendecke
6b167ae53b Use a switch statement in charset_name() 2009-07-25 12:58:06 -04:00
Volker Lendecke
ddcfdd8ecf Fix some nonempty blank lines 2009-07-25 12:58:06 -04:00
Volker Lendecke
033185e2a1 Make the smbd VFS typesafe 2009-07-24 11:42:05 -04:00
Michael Adam
319a97bce9 s3:dbwrap: use the transaction wrapper in dbwrap_trans_store().
Now dbwrap_util.c contains only one call to each of
transaction_start, transaction_commit and transaction_cancel.

Michael
2009-07-21 12:40:34 +02:00
Michael Adam
d5efb38151 s3:dbwrap: use the transaction wrapper in dbwrap_trans_delete().
Michael
2009-07-21 12:40:34 +02:00
Jeremy Allison
eba2eb45e2 Fix a typo reading uninitialized memory. Caught by valgrind.
Jeremy.
2009-07-17 18:05:10 -07:00
Jeremy Allison
d4a87ee966 Replace more long-lived contexts with talloc_autofree_context().
Jeremy.
2009-07-16 18:14:56 -07:00
Jeremy Allison
d5c20c072b Replace short-lived NULL talloc contexts with talloc_tos().
Jeremy.
2009-07-16 18:13:46 -07:00
Stefan Metzmacher
8447600d98 s3:tldap: fix the build - a void function should not return a value
metze
2009-07-15 20:59:34 +02:00
Michael Adam
7bd4699228 s3:dbwrap: fix embarrassing typo :-)
Michael
2009-07-15 17:10:47 +02:00
Michael Adam
3071b07122 s3:dbwrap_util: add my C
Michael
2009-07-15 14:01:40 +02:00
Michael Adam
3b3125fc23 s3:dbwrap: add dbwrap_fetch_bystring_upper().
To fetch a key whose name is stored but not given in upper case.

Michael
2009-07-15 14:01:39 +02:00
Michael Adam
32a3275344 s3:dbwrap: add dbwrap_store_bystring_upper().
This stores a key under the uppercase version of the given keyname.

Michael
2009-07-15 14:01:38 +02:00
Michael Adam
804d3f897b s3:dbwrap: add dbwrap_delete_bystring_upper()
To delete a key whose name is not given in but stored in uppercase.

Michael
2009-07-15 14:01:38 +02:00
Michael Adam
5b594c6958 s3:dbwrap: add a wrapper dbwrap_trans_do()
This function wraps the action() callback into a db
transaction and the transaction is either committed
or cancelled, depending on the return value of
the action function.

Michael
2009-07-15 14:00:43 +02:00
Stefan Metzmacher
fafe2589e6 s3:lib: map ENOSYS to NT_STATUS_NOT_SUPPORTED instead of NT_STATUS_ACCESS_DENIED
Jeremy: please check and decide if we want to backport this.

metze
2009-07-15 11:55:39 +02:00
Volker Lendecke
76705d10c6 Consolidate gencache also every 100 writes in a single process 2009-07-15 10:55:20 +02:00
Volker Lendecke
3d7dfc1197 Consolidate string and data_blob routines in gencache 2009-07-15 10:55:20 +02:00
Volker Lendecke
8a17cd810f Make gencache more stable
This provides a compromise between stability and performance: gencache is a
persistent database these days that for performance reasons can not use tdb
transactions for all writes. This patch splits up gencache into gencache.tdb
and gencache_notrans.tdb. gencache_notrans is used with CLEAR_IF_FIRST, writes
to it don't use transactions. By default every 5 minutes and when a program
exits, all entries from _notrans.tdb are transferred to gencache.tdb in one
transaction.
2009-07-15 10:55:20 +02:00
Volker Lendecke
ed87594e5f Add tdb_data_cmp 2009-07-15 10:55:20 +02:00
Volker Lendecke
3edcd55bf1 Remove gencache_init/shutdown
gencache_get/set/del/iterate call gencache_init() internally anyway. And we've
been very lazy calling gencache_shutdown, so this seems not really required.
2009-07-15 10:55:20 +02:00
Volker Lendecke
e5a34b2533 Remove gencache_[un]lock_key 2009-07-15 10:55:20 +02:00
Volker Lendecke
3e965d017d TDB_CONTEXT -> "struct tdb_context" 2009-07-15 10:55:19 +02:00
Volker Lendecke
565046891f Replace ASSERTs in gencache with "return false"
It's a bit strong to panic here I think.
2009-07-15 10:55:19 +02:00
Björn Jacke
036bad6131 s3: allow setting the TCP_QUICKACK socket option 2009-07-14 22:29:59 +02:00
Günther Deschner
9f15ef11bd s3-account_policy: add pdb_policy_type enum.
Guenther
2009-07-14 12:12:18 +02:00
Günther Deschner
39fa9468c6 s3-account_policy: remove trailing whitespace.
Guenther
2009-07-14 12:10:11 +02:00
Günther Deschner
05fbe0c7f7 libds: merge the UF<->ACB flag mapping functions.
Guenther
2009-07-13 15:36:07 +02:00
Volker Lendecke
d8556bbf13 Quieten events and tldap debug messages 2009-07-10 22:01:56 +02:00
Volker Lendecke
0a0bff353e Fix our base64 implementation for blobs of length 4....
The additional length check bit us exactly at 4, removing it. The
torture test survives valgrind up to 2000 bytes :-)
2009-07-10 18:16:46 +02:00
Volker Lendecke
c624a704be Make escape_ldap_string take a talloc context 2009-07-09 22:25:29 +02:00
Tim Prouty
161e182b65 s3: Remove is_ntfs_stream_name() and split_ntfs_stream_name()
Actually I moved split_ntfs_stream_name into torture.c which is the one
consumer of it.  This could probably be changed at some point.
2009-07-08 21:36:04 -07:00
Jeremy Allison
400c18a8c4 Rename update_stat_ex_writetime() -> update_stat_ex_mtime()
to better describe what we're doing here.
Jeremy
2009-07-08 18:05:30 -07:00
Jeremy Allison
c9c3d4312d The migration to struct stat_ex broke the calculation of
create time from the existing timestamps (for systems
that need to do this). Once the write time is changed
via a sticky write, the create time might need to be
recalculated. To do this I needed to add a bool into
struct stat_ex to remember if the st_ex_btime field
was calculated, or read from the OS. Also fixed the
returning of modified write timestamps in the return
from NTCreateX, SMBattr and SMBattrE (which weren't
taking into account the modified timestamp stored
in the open file table). Attempting to fix an issue
with Excel 2003 and offline files. Volker and Metze,
please review.
Jeremy
2009-07-08 17:51:35 -07:00
Jeremy Allison
58daaa3d1e When faking a create time, use the full timespec values, not time_t.
Jeremy.
2009-07-08 12:28:01 -07:00
Volker Lendecke
bc1e93cc80 Add tldap_pull_guid 2009-07-04 12:54:22 +02:00
Volker Lendecke
cfacece9ed tldap: Do not do a return before we got the search_result 2009-07-03 23:20:57 +02:00
Michael Adam
914fa629f2 Revert "[s3]pidfile_create: use check is_default_dyn_CONFIGFILE() since we have it."
This reverts commit 1d3dcd1e42.

This fixes Bug #6531 (Pid File creation.)

Usually, I would extend is_default_dyn_XYZ() so that it returns true
when dyn_XYZ has not been set yet or when its value is equal to the
compiled in default value XZY. But this would have a change in effect
in popt_common and torture.c: is_default_dyn_CONFIGFILE() is used
there to check whether the config file should be overwritten by the
contents of the environment variable SMB_CONF_PATH. Currently this
is only done when set_dyn_CONFIGFILE() had _not_ previously been called
at all, not even with the same value as the compiled in default.

Michael
2009-07-03 12:41:08 +02:00
Andrew Tridgell
0bdaa8b4ac LDB_ERR_INVALID_DN_SYNTAX doesn't exist ...
The correct name is ldb.ERR_INVALID_DN_SYNTAX
2009-07-02 14:55:38 +10:00
Stefan Metzmacher
a14efbadd5 s3:util: let parent_dirname() correctly return toplevel filenames
metze
2009-07-01 12:53:41 +02:00
Michael Adam
3650143712 s3:lib/sysquotas: fix usage of SMB_STRUCT_STAT (struct stat_ex).
This fixes the build with quotas / configure time detection
of sys_quota interface.

Michael
2009-06-29 16:51:53 +02:00
Andrew Bartlett
6e92505080 Fix ndrdump to use a common setup_logging() API
By adding a new common setup_logging_stdout() API, we no longer need to abuse the ABI compatability between the different setup_logging() calls in Samba3 and Samba4's DEBUG() subsystems.

The revert of 49a6d757b4 works with this
to fix bug 6211.

Andrew Bartlett
2009-06-29 20:12:23 +10:00
David Markey
55ed0be65f Fix bug 6514: net gives unhelpful "lp_load failed" when it's missing smb.conf 2009-06-29 08:12:48 +02:00
Volker Lendecke
344dbced50 If the connection is down, don't try another write. 2009-06-28 15:51:02 +02:00
Volker Lendecke
c594d21fda Add tldap_search_va 2009-06-28 15:51:02 +02:00
Volker Lendecke
ae5e1d9841 tldap_msg_received: Properly free the asn1_struct in case of an error 2009-06-28 15:51:02 +02:00
Volker Lendecke
8e22e38c9c Move read_ldap_done after read_ldap_send 2009-06-27 23:17:49 +02:00
Volker Lendecke
f5321ffea8 Convert tldap to tstream 2009-06-27 23:17:49 +02:00
Volker Lendecke
55dae4469c Add tstream_read_packet 2009-06-27 23:17:49 +02:00
Volker Lendecke
53b9a24ce3 tldap: Don't fire off more than one read_ldap request during searches 2009-06-27 22:30:14 +02:00
Volker Lendecke
382a937800 Fix some dead code warnings from SUN Studio 2009-06-26 17:45:16 +02:00
Volker Lendecke
4aade2768b Add tldap paged searches, together with two helper routines 2009-06-20 18:54:07 +02:00
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