samba.git
16 years agor24135: Convert call_trans2open to the new API
Volker Lendecke [Thu, 2 Aug 2007 18:28:41 +0000 (18:28 +0000)]
r24135: Convert call_trans2open to the new API

This itself won't help much, because send_trans2_replies_new still allocates
the big buffers, but stay tuned :-)

Also add/update my copyright on stuff I recently touched.

Volker

16 years agor24134: talloc smb_request for handle_trans2
Volker Lendecke [Thu, 2 Aug 2007 18:13:57 +0000 (18:13 +0000)]
r24134: talloc smb_request for handle_trans2

When starting to convert the individual trans2 subcalls, I need the new
API conventions to be present there. This means that those calls fill in
req->outbuf when there's something to ship

16 years agor24133: Explicitly pass flags2 down to push_string_fn
Volker Lendecke [Thu, 2 Aug 2007 18:06:45 +0000 (18:06 +0000)]
r24133: Explicitly pass flags2 down to push_string_fn

This needs a bit closer review, it also touches the client libs

16 years agor24131: - make it more clear what the different min and max fields mean
Stefan Metzmacher [Thu, 2 Aug 2007 17:41:47 +0000 (17:41 +0000)]
r24131: - make it more clear what the different min and max fields mean
- with the "GSSAPI" sasl mech the plain, sign or seal negotiation
  is independed from the req_flags and ret_flags
- verify the server supports the wrapping type we want
- better handling on negotiated buffer sizes

metze

16 years agor24130: Explicitly pass flags2 to srvstr_push
Volker Lendecke [Thu, 2 Aug 2007 17:37:38 +0000 (17:37 +0000)]
r24130: Explicitly pass flags2 to srvstr_push

This is in preparation of the trans2 conversion: srvstr_push should not
look at inbuf directly.

16 years agor24128: fix double free in error path
Stefan Metzmacher [Thu, 2 Aug 2007 15:11:37 +0000 (15:11 +0000)]
r24128: fix double free in error path

metze

16 years agor24125: use TALLOC_FREE()
Stefan Metzmacher [Thu, 2 Aug 2007 09:22:47 +0000 (09:22 +0000)]
r24125: use TALLOC_FREE()

metze

16 years agor24123: add file_id_create() to some vfs modules
Stefan Metzmacher [Thu, 2 Aug 2007 09:19:04 +0000 (09:19 +0000)]
r24123: add file_id_create() to some vfs modules

metze

16 years agor24120: add a file_id_create() hook into the VFS layer
Stefan Metzmacher [Thu, 2 Aug 2007 08:53:24 +0000 (08:53 +0000)]
r24120: add a file_id_create() hook into the VFS layer

it's needed for some cluster filesystems to
overload this function.

metze

16 years agor24119: Convert reply_exit to the new API
Volker Lendecke [Thu, 2 Aug 2007 05:50:40 +0000 (05:50 +0000)]
r24119: Convert reply_exit to the new API

16 years agor24117: use locking_key() instead of forming the TDB_DATA key
Stefan Metzmacher [Wed, 1 Aug 2007 13:39:25 +0000 (13:39 +0000)]
r24117: use locking_key() instead of forming the TDB_DATA key
by hand

metze

16 years agor24115: try to get the file name and share patch for printing
Stefan Metzmacher [Wed, 1 Aug 2007 11:18:56 +0000 (11:18 +0000)]
r24115: try to get the file name and share patch for printing
brlocks from the share_mode db, as the same fileid
is used.

metze

16 years agor24113: some little fixes to get the correct error message
Stefan Metzmacher [Wed, 1 Aug 2007 10:03:13 +0000 (10:03 +0000)]
r24113: some little fixes to get the correct error message
when using "clustering = yes" and ctdbd isn't running

metze

16 years agor24107: Fix bug 4849. Thanks to Matthijs Kooijman <matthijs@stdin.nl>
Volker Lendecke [Tue, 31 Jul 2007 19:15:27 +0000 (19:15 +0000)]
r24107: Fix bug 4849. Thanks to Matthijs Kooijman <matthijs@stdin.nl>

16 years agor24106: Pass fnum instead of buf/offset into get_rpc_pipe_p
Volker Lendecke [Tue, 31 Jul 2007 13:14:07 +0000 (13:14 +0000)]
r24106: Pass fnum instead of buf/offset into get_rpc_pipe_p

16 years agor24104: fix the build, sorry...
Stefan Metzmacher [Tue, 31 Jul 2007 12:30:37 +0000 (12:30 +0000)]
r24104: fix the build, sorry...

metze

16 years agor24103: add some useful debug messages, as not all LDAP
Stefan Metzmacher [Tue, 31 Jul 2007 12:27:25 +0000 (12:27 +0000)]
r24103: add some useful debug messages, as not all LDAP
libraries support wrapping hooks...

metze

16 years agor24102: Pass the fid instead of inbuf and an offset to file_fsp.
Volker Lendecke [Tue, 31 Jul 2007 12:05:40 +0000 (12:05 +0000)]
r24102: Pass the fid instead of inbuf and an offset to file_fsp.

This removes the buf==NULL condition in file_fsp(), but wherever it is called
we do have a buffer anyway.

Volker

16 years agor24101: Move prohibited_ea_names[] into samba_private_attr_name()
Volker Lendecke [Tue, 31 Jul 2007 11:26:24 +0000 (11:26 +0000)]
r24101: Move prohibited_ea_names[] into samba_private_attr_name()

Minor cleanup

16 years agor24100: Convert reply_ntcancel to the new API
Volker Lendecke [Tue, 31 Jul 2007 10:04:54 +0000 (10:04 +0000)]
r24100: Convert reply_ntcancel to the new API

16 years agor24098: - make use of the ads_service_principal abstraction
Stefan Metzmacher [Tue, 31 Jul 2007 09:49:14 +0000 (09:49 +0000)]
r24098: - make use of the ads_service_principal abstraction
  also for the "GSSAPI" sasl mech.
- also use the ads_kinit_password() fallback logic
  from the "GSS-SPNEGO" sasl mech.

metze

16 years agor24097: Convert reply_ntcreate_and_X_quota to the new API
Volker Lendecke [Tue, 31 Jul 2007 09:41:21 +0000 (09:41 +0000)]
r24097: Convert reply_ntcreate_and_X_quota to the new API

16 years agor24095: add one more fallback alternative to
Stefan Metzmacher [Tue, 31 Jul 2007 09:37:25 +0000 (09:37 +0000)]
r24095: add one more fallback alternative to
construct the principal

metze

16 years agor24093: move gssapi/krb5 principal handling into a function
Stefan Metzmacher [Tue, 31 Jul 2007 09:31:47 +0000 (09:31 +0000)]
r24093: move gssapi/krb5 principal handling into a function

metze

16 years agor24092: Convert do_ntcreate_pipe_open to the new API
Volker Lendecke [Tue, 31 Jul 2007 09:22:16 +0000 (09:22 +0000)]
r24092: Convert do_ntcreate_pipe_open to the new API

nt_open_pipe_new() is a copy of nt_open_pipe(). It will stick for a bit
until do_nt_transact_create_pipe is converted as well.

16 years agor24091: Convert reply_ntcreate_and_X to the new API
Volker Lendecke [Tue, 31 Jul 2007 08:56:08 +0000 (08:56 +0000)]
r24091: Convert reply_ntcreate_and_X to the new API

The routines called will follow

16 years agor24090: Separate parsing in reply_ntcreate_and_X
Volker Lendecke [Tue, 31 Jul 2007 08:37:54 +0000 (08:37 +0000)]
r24090: Separate parsing in reply_ntcreate_and_X

In particular, check if we have enough parameters

16 years agor24089: Add reply_prep/post_legacy
Volker Lendecke [Tue, 31 Jul 2007 08:06:56 +0000 (08:06 +0000)]
r24089: Add reply_prep/post_legacy

Routines to ease the transition to the new API

16 years agor24088: Convert reply_unlink to the new API
Volker Lendecke [Tue, 31 Jul 2007 07:57:33 +0000 (07:57 +0000)]
r24088: Convert reply_unlink to the new API

16 years agor24087: Fix bug 4836, patch by Matthijs Kooijman <matthijs@stdin.nl>. Thanks!
Volker Lendecke [Tue, 31 Jul 2007 05:11:40 +0000 (05:11 +0000)]
r24087: Fix bug 4836, patch by Matthijs Kooijman <matthijs@stdin.nl>. Thanks!

Volker

16 years agor24086: Convert reply_ulogoffX to the new API
Volker Lendecke [Mon, 30 Jul 2007 19:53:57 +0000 (19:53 +0000)]
r24086: Convert reply_ulogoffX to the new API

16 years agor24085: Convert reply_rmdir to the new API
Volker Lendecke [Mon, 30 Jul 2007 14:07:29 +0000 (14:07 +0000)]
r24085: Convert reply_rmdir to the new API

16 years agor24084: Convert reply_mkdir to the new API
Volker Lendecke [Mon, 30 Jul 2007 11:35:39 +0000 (11:35 +0000)]
r24084: Convert reply_mkdir to the new API

16 years agor24079: Convert reply_dskattr to the new API
Volker Lendecke [Mon, 30 Jul 2007 10:30:19 +0000 (10:30 +0000)]
r24079: Convert reply_dskattr to the new API

16 years agor24078: Add reply_unixerror
Volker Lendecke [Mon, 30 Jul 2007 10:23:26 +0000 (10:23 +0000)]
r24078: Add reply_unixerror

16 years agor24077: Convert reply_tdis to the new API
Volker Lendecke [Mon, 30 Jul 2007 10:20:52 +0000 (10:20 +0000)]
r24077: Convert reply_tdis to the new API

16 years agor24072: Add "client ldap sasl wrapping" parameter.
Stefan Metzmacher [Mon, 30 Jul 2007 08:22:45 +0000 (08:22 +0000)]
r24072: Add "client ldap sasl wrapping" parameter.
Possible values are "plain" (default), "sign" or "seal".

metze

16 years agor24071: Fix a missing END_PROFILE call
Volker Lendecke [Mon, 30 Jul 2007 07:50:24 +0000 (07:50 +0000)]
r24071: Fix a missing END_PROFILE call

16 years agor24070: Apply some const
Volker Lendecke [Sun, 29 Jul 2007 16:40:45 +0000 (16:40 +0000)]
r24070: Apply some const

16 years agor24069: Fix Coverity ID 368. We would segfault if 0 < data.dsize < 8
Volker Lendecke [Sun, 29 Jul 2007 09:51:06 +0000 (09:51 +0000)]
r24069: Fix Coverity ID 368. We would segfault if 0 < data.dsize < 8

16 years agor24068: Fix Coverity id 366 (dead code). We have checked for argc >= 3 above.
Volker Lendecke [Sun, 29 Jul 2007 09:23:55 +0000 (09:23 +0000)]
r24068: Fix Coverity id 366 (dead code). We have checked for argc >= 3 above.

16 years agor24067: Fix a type mismatch found by the IBM checker
Volker Lendecke [Sat, 28 Jul 2007 18:52:28 +0000 (18:52 +0000)]
r24067: Fix a type mismatch found by the IBM checker

16 years agor24066: Fix memleak found by Volker. We don't leak keys now with MIT and Heimdal.
Günther Deschner [Fri, 27 Jul 2007 09:22:43 +0000 (09:22 +0000)]
r24066: Fix memleak found by Volker. We don't leak keys now with MIT and Heimdal.

Guenther

16 years agor24065: According to gd, this breaks heimdal. Thanks for checking!
Volker Lendecke [Fri, 27 Jul 2007 09:15:13 +0000 (09:15 +0000)]
r24065: According to gd, this breaks heimdal. Thanks for checking!

16 years agor24062: fix logic for broken krb5 libs which always force
Stefan Metzmacher [Fri, 27 Jul 2007 07:19:36 +0000 (07:19 +0000)]
r24062: fix logic for broken krb5 libs which always force
sign and seal...

metze

16 years agor24058: Fix some memory leaks in ads_secrets_verify_ticket.
Volker Lendecke [Thu, 26 Jul 2007 17:27:03 +0000 (17:27 +0000)]
r24058: Fix some memory leaks in ads_secrets_verify_ticket.

Jeremy, Günther, please review!

Thanks,

Volker

16 years agor24057: Fix some uninitialized variables found by the IBM checker
Volker Lendecke [Thu, 26 Jul 2007 16:39:48 +0000 (16:39 +0000)]
r24057: Fix some uninitialized variables found by the IBM checker

16 years agor24056: Another big one: This converts reply_sesssetup_and_X to the new API. As usual,
Volker Lendecke [Thu, 26 Jul 2007 16:01:12 +0000 (16:01 +0000)]
r24056: Another big one: This converts reply_sesssetup_and_X to the new API. As usual,
its history can be found on http://samba.org/~vlendec/sesssetup/. This very
obviously needs close review.

Volker

16 years agor24055: Remove a reference to the outdated samba-docs mailing list. This entire
Gerald Carter [Thu, 26 Jul 2007 12:08:13 +0000 (12:08 +0000)]
r24055: Remove a reference to the outdated samba-docs mailing list.  This entire
README really needs to be overhauled at some point.

16 years agor24054: Fix some warnings
Volker Lendecke [Thu, 26 Jul 2007 07:48:14 +0000 (07:48 +0000)]
r24054: Fix some warnings

16 years agor24050: Fix a typo
Volker Lendecke [Wed, 25 Jul 2007 20:01:03 +0000 (20:01 +0000)]
r24050: Fix a typo

16 years agor24049: Some more 64-bit warnings
Volker Lendecke [Wed, 25 Jul 2007 18:53:16 +0000 (18:53 +0000)]
r24049: Some more 64-bit warnings

16 years agor24048: Fix the C++ warnings in our version of popt
Volker Lendecke [Wed, 25 Jul 2007 18:47:40 +0000 (18:47 +0000)]
r24048: Fix the C++ warnings in our version of popt

16 years agor24047: With -Wmissing-prototypes these two always generate warnings. They
Volker Lendecke [Wed, 25 Jul 2007 18:45:57 +0000 (18:45 +0000)]
r24047: With -Wmissing-prototypes these two always generate warnings. They
should be properly prototyped. For now, gloss over the warning.

16 years agor24046: Fix a 64-bit warning
Volker Lendecke [Wed, 25 Jul 2007 18:39:10 +0000 (18:39 +0000)]
r24046: Fix a 64-bit warning

16 years agor24044: Fix an uninitialized variable warning
Volker Lendecke [Wed, 25 Jul 2007 13:05:54 +0000 (13:05 +0000)]
r24044: Fix an uninitialized variable warning

16 years agor24042: add support for krb5 sign and seal in LDAP via "GSS-SPNEGO"
Stefan Metzmacher [Wed, 25 Jul 2007 10:34:16 +0000 (10:34 +0000)]
r24042: add support for krb5 sign and seal in LDAP via "GSS-SPNEGO"

metze

16 years agor24039: remove unused global variable...
Stefan Metzmacher [Wed, 25 Jul 2007 08:09:34 +0000 (08:09 +0000)]
r24039: remove unused global variable...

metze

16 years agor24037: only setup sasl wrapping after a successful bind
Stefan Metzmacher [Wed, 25 Jul 2007 07:23:20 +0000 (07:23 +0000)]
r24037: only setup sasl wrapping after a successful bind

metze

16 years agor24036: Fix dfs rename bug in smbclient reported by Thomas Bork <tombork@web.de>.
Jeremy Allison [Tue, 24 Jul 2007 22:28:19 +0000 (22:28 +0000)]
r24036: Fix dfs rename bug in smbclient reported by Thomas Bork <tombork@web.de>.
Couldn't rename file as we weren't DFS enabling the target path.
Jeremy.

16 years agor24034: Print the full cluster pid in print_lock_struct
Volker Lendecke [Tue, 24 Jul 2007 11:50:54 +0000 (11:50 +0000)]
r24034: Print the full cluster pid in print_lock_struct

16 years agor24033: We need to be able to cope with packet_handler calling itself
Volker Lendecke [Tue, 24 Jul 2007 11:48:35 +0000 (11:48 +0000)]
r24033: We need to be able to cope with packet_handler calling itself
recursively

16 years agor24032: It helps testing tremendously if the cluster messaging actually sends
Volker Lendecke [Tue, 24 Jul 2007 11:47:37 +0000 (11:47 +0000)]
r24032: It helps testing tremendously if the cluster messaging actually sends
and receives messages to other nodes... :-)

16 years agor24031: Fix some 64 bit warnings
Volker Lendecke [Tue, 24 Jul 2007 11:45:29 +0000 (11:45 +0000)]
r24031: Fix some 64 bit warnings

16 years agor24029: merge from http://samba.org/~tridge/samba_3_2_ctdb/:
Stefan Metzmacher [Tue, 24 Jul 2007 10:35:10 +0000 (10:35 +0000)]
r24029: merge from samba.org/~tridge/samba_3_2_ctdb/:

the claim_connection() must come after the sockets are open

metze

16 years agor24027: merge from http://people.samba.org/bzr/metze/samba/3_2-ctdb-metze/:
Stefan Metzmacher [Tue, 24 Jul 2007 10:24:27 +0000 (10:24 +0000)]
r24027: merge from people.samba.org/bzr/metze/samba/3_2-ctdb-metze/:

add in any cluster addresses. We need to response to these,
but not listen on them. This allows us to run nmbd on every
node in the cluster, and have all of them register with a
WINS server correctly

metze

16 years agor24025: packet_send() expects DATA_BLOB elements as vaargs
Stefan Metzmacher [Tue, 24 Jul 2007 09:47:26 +0000 (09:47 +0000)]
r24025: packet_send() expects DATA_BLOB elements as vaargs
and not TDB_DATA

metze

16 years agor24024: Minor cleanup in ads_parse_gp_ext().
Günther Deschner [Tue, 24 Jul 2007 09:46:21 +0000 (09:46 +0000)]
r24024: Minor cleanup in ads_parse_gp_ext().

Guenther

16 years agor24023: Correctly support REG_BINARY in registry_push_value() and
Günther Deschner [Tue, 24 Jul 2007 09:42:15 +0000 (09:42 +0000)]
r24023: Correctly support REG_BINARY in registry_push_value() and
registry_pull_value().

Guenther

16 years agor24021: use MSG_BROADCAST_PID_STR as value for broadcast messages
Stefan Metzmacher [Tue, 24 Jul 2007 09:32:05 +0000 (09:32 +0000)]
r24021: use MSG_BROADCAST_PID_STR as value for broadcast messages
to fix the cluster case

vl: please check, if this works with clustering = no

metze

16 years agor24019: merge from http://people.samba.org/bzr/metze/samba/3_2-ctdb-metze/:
Stefan Metzmacher [Tue, 24 Jul 2007 09:20:23 +0000 (09:20 +0000)]
r24019: merge from people.samba.org/bzr/metze/samba/3_2-ctdb-metze/:

use a timed event to make sure the timelimit is correctly
handled in smbcontrol when waiting for messages

metze

16 years agor24017: merge from http://samba.org/~tridge/samba_3_2_ctdb/:
Stefan Metzmacher [Tue, 24 Jul 2007 08:59:36 +0000 (08:59 +0000)]
r24017: merge from samba.org/~tridge/samba_3_2_ctdb/:
add add_trusted_domain() can return NULL

metze

16 years agor24015: merge RHEL4-CTDB packaging stuff from
Stefan Metzmacher [Tue, 24 Jul 2007 08:42:21 +0000 (08:42 +0000)]
r24015: merge RHEL4-CTDB packaging stuff from
http://people.samba.org/bzr/metze/samba/3_2-ctdb-metze/

metze

16 years agor24013: merge from http://samba.org/~tridge/samba_3_2_ctdb/:
Stefan Metzmacher [Tue, 24 Jul 2007 08:04:42 +0000 (08:04 +0000)]
r24013: merge from samba.org/~tridge/samba_3_2_ctdb/:
fixed prototype

metze

16 years agor24009: Revert to the 3.0.25 logic for parsing the client's protocols. hpisgr8
Volker Lendecke [Mon, 23 Jul 2007 19:46:48 +0000 (19:46 +0000)]
r24009: Revert to the 3.0.25 logic for parsing the client's protocols. hpisgr8
with gcc still gives timeouts which worry me.

Volker

16 years agor24008: Fix Bug 4792. Thanks to David Gajewski <dgajews@math.utoledo.edu> and to
Volker Lendecke [Mon, 23 Jul 2007 19:09:19 +0000 (19:09 +0000)]
r24008: Fix Bug 4792. Thanks to David Gajewski <dgajews@math.utoledo.edu> and to
Timur I. Bakeyev for bugging me :-)

Volker

16 years agor24007: Attempt to fix the build on host "gwen". The Makefile ended up with an
Volker Lendecke [Mon, 23 Jul 2007 15:29:56 +0000 (15:29 +0000)]
r24007: Attempt to fix the build on host "gwen". The Makefile ended up with an
empty line.

16 years agor24006: Some more paranoia in reply_negprot
Volker Lendecke [Mon, 23 Jul 2007 14:36:54 +0000 (14:36 +0000)]
r24006: Some more paranoia in reply_negprot

Some hosts see the smb_bufrem(req->inbuf, p) as an unsigned int. And as
the p += strlen(p) + 2 went one beyond the buffer, this was a very
large positive. Also take the chance to add one more consistency check.

16 years agor24005: Attempt to fix the build on host deckchair
Volker Lendecke [Mon, 23 Jul 2007 13:47:17 +0000 (13:47 +0000)]
r24005: Attempt to fix the build on host deckchair

16 years agor24004: Convert reply_checkpath to the new API
Volker Lendecke [Mon, 23 Jul 2007 12:03:58 +0000 (12:03 +0000)]
r24004: Convert reply_checkpath to the new API

16 years agor24003: Convert reply_tcon_and_X to the new API
Volker Lendecke [Mon, 23 Jul 2007 11:38:29 +0000 (11:38 +0000)]
r24003: Convert reply_tcon_and_X to the new API

16 years agor24002: Convert reply_negprot to the new API
Volker Lendecke [Mon, 23 Jul 2007 11:18:20 +0000 (11:18 +0000)]
r24002: Convert reply_negprot to the new API

16 years agor24001: Separate out the parsing of the client's requested protocols
Volker Lendecke [Mon, 23 Jul 2007 11:08:43 +0000 (11:08 +0000)]
r24001: Separate out the parsing of the client's requested protocols

This way the range checking only needs to be done once

16 years agor24000: Add message_push_blob() and message_push_string().
Volker Lendecke [Mon, 23 Jul 2007 10:52:39 +0000 (10:52 +0000)]
r24000: Add message_push_blob() and message_push_string().

The proposed new API convention is to start with a 0 bcc length and then
push things step by step. These routines reallocate the outbuf and
adjust the length and bcc fields as necessary.

16 years agor23999: Convert reply_open_and_X
Volker Lendecke [Mon, 23 Jul 2007 09:54:36 +0000 (09:54 +0000)]
r23999: Convert reply_open_and_X

This is an example of chained code that is executed in make test

16 years agor23998: Convert reply_close to the new API
Volker Lendecke [Mon, 23 Jul 2007 09:53:06 +0000 (09:53 +0000)]
r23998: Convert reply_close to the new API

16 years agor23997: Check in the infrastructure for getting rid of the global InBuffer/OutBuffer
Volker Lendecke [Mon, 23 Jul 2007 09:36:09 +0000 (09:36 +0000)]
r23997: Check in the infrastructure for getting rid of the global InBuffer/OutBuffer

The complete history of this patch can be found under
http://www.samba.org/~vlendec/inbuf-checkin/.

Jeremy, Jerry: If possible I would like to see this in 3.2.0. I'm only
checking into 3_2 at the moment, as it currently will slow down operations for
all non-converted (i.e. all at this moment) operations, as it will copy the
talloc'ed inbuf over the global InBuffer. It will need quite a bit of effort
to convert everything necessary for the normal operations an XP box does.

I have patches for negprot, session setup, tcon_and_X, open_and_X, close. More
to come, but I would appreciate some help here.

Volker

16 years agor23996: One more const
Volker Lendecke [Mon, 23 Jul 2007 08:20:44 +0000 (08:20 +0000)]
r23996: One more const

16 years agor23992: Some const
Volker Lendecke [Sun, 22 Jul 2007 17:13:46 +0000 (17:13 +0000)]
r23992: Some const

16 years agor23991: Some const
Volker Lendecke [Sun, 22 Jul 2007 13:51:39 +0000 (13:51 +0000)]
r23991: Some const

16 years agor23990: Reformatting for 80 cols and trailing whitespace
Volker Lendecke [Sun, 22 Jul 2007 11:38:11 +0000 (11:38 +0000)]
r23990: Reformatting for 80 cols and trailing whitespace

16 years agor23989: For testing purposes, add "echo" to smbclient
Volker Lendecke [Sun, 22 Jul 2007 11:18:49 +0000 (11:18 +0000)]
r23989: For testing purposes, add "echo" to smbclient

16 years agor23988: Looks a lot more scary than it is: This just unwraps the else-branch of
Volker Lendecke [Sat, 21 Jul 2007 22:29:55 +0000 (22:29 +0000)]
r23988: Looks a lot more scary than it is: This just unwraps the else-branch of
if (smb_messages[type].fn == NULL) { into the function top-level. Makes
this function a bit easier to understand IMO.

Volker

16 years agor23987: Remove static pid in switch_message()
Volker Lendecke [Sat, 21 Jul 2007 22:00:09 +0000 (22:00 +0000)]
r23987: Remove static pid in switch_message()

There's no point in duplicating functionality that exists in
sys_getpid() that also only used in a debug statement

16 years agor23986: Some const
Volker Lendecke [Sat, 21 Jul 2007 21:56:33 +0000 (21:56 +0000)]
r23986: Some const

16 years agor23981: Make tdb_validate_and_backup try harder to end up with a valid tdb:
Michael Adam [Fri, 20 Jul 2007 16:39:42 +0000 (16:39 +0000)]
r23981: Make tdb_validate_and_backup try harder to end up with a valid tdb:

If restoring a backup fails due to lack of space, remove the
corrupt tdb previously moved away to "name.corrupt", and retry.
If restoring still fails, move the backup in place instead of
copying it.

Michael

16 years agor23980: Fix one more use of pwrite in expand_file.
Michael Adam [Fri, 20 Jul 2007 16:31:32 +0000 (16:31 +0000)]
r23980: Fix one more use of pwrite in expand_file.

Michael

16 years agor23979: Fix another occurence of (written != requested) as an
Michael Adam [Fri, 20 Jul 2007 15:00:58 +0000 (15:00 +0000)]
r23979: Fix another occurence of (written != requested) as an
error condition to write. This is in tdb_new_database.

Fix one call to tdb_new_database in tdb_open_ex to not
overwrite the newly propagated errno (typically ENOSPC).

Michael

16 years agor23977: Im prove the pwrite-patch to tdb_expand_file of r23972:
Michael Adam [Fri, 20 Jul 2007 14:23:12 +0000 (14:23 +0000)]
r23977: Im prove the pwrite-patch to tdb_expand_file of r23972:

* prevent infinite loops due to 0 bytes written:
  try once more. if we still get 0 as return,
  set errno to ENOSPC and return -1 (error)

* replace int by correct types (ssize_t and size_t).

* print a warning log message in case "written < requested to write"
  usually this means, that the next call to pwrite will fail
  with return value -1 and set errno accordingly.

  Note that the former error condition "written != requested to write"
  is not a correct error condition of write/pwrite. If this is due
  to an error, a subsequent call to (p)write will reveal the cause
  (typically "no space left on device" - ENOSPC).

Michael

16 years agor23976: Move authdata.o to LIBADS_SERVER_OBJ.
Günther Deschner [Thu, 19 Jul 2007 14:49:08 +0000 (14:49 +0000)]
r23976: Move authdata.o to LIBADS_SERVER_OBJ.

Guenther