Commit Graph

10043 Commits

Author SHA1 Message Date
Simon Wilkinson
fbe6f0f4ad afsd: Move to newer cmd syntax
Move afsd over to using the newer cmd functions, and avoid using
direct array access, and fixed offsets.

Change-Id: I6e09823d764cbe6109c9a72700239d814b91db0c
Reviewed-on: http://gerrit.openafs.org/7137
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-11 07:03:16 -07:00
Jeffrey Altman
46d76d8821 Windows: Do not delete in CleanupFile if error
If an error was detected when processing RDR_CleanupFileEntry()
do not perform the file deletion.  Just return the error as
attempting the deletion could result in an exception.

Change-Id: I57b17a15d1bdda4d0890dbe59f9e2432d465250f
Reviewed-on: http://gerrit.openafs.org/7186
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-11 06:48:15 -07:00
Michael Meffie
f0b039fc47 libafs: log error code when marking server down
Log the error code when marking the server down due
to server/networks issues.

Change-Id: Ib3d57562642ca564dcfeaa775de66f54d08f23af
Reviewed-on: http://gerrit.openafs.org/7138
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-10 14:34:59 -07:00
Simon Wilkinson
3720f6b646 Rework the ugen_* interface
Remodel the ugen_* ubik initialisation interface so that more complex
sets of security flags can be passed through it. A number of new
functions are provided, all of which take the AFSCONF_* security flags
defined in libauth:

*) ugen_ClientInitCell is used to initialise a ubik client structure
   when the caller already has afsconf_dir and afsconf_cell
   structures for the cell being contacted
*) ugen_ClientInitServer is used to initialise a client which will
   contact a specific server within a given cell, rather than
   selecting one from the pool
*) ugen_ClientInitFlags is used to initialise a client given a
   cellname, and a path to a configuration directory. It is is
   closest to the legacy ugen_ClientInit function.

All of the in tree callers are updated to use this new interface

Change-Id: I6a438aa70d94114c8b6626fa1396b7580ab07c07
Reviewed-on: http://gerrit.openafs.org/7131
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-10 14:34:40 -07:00
Marc Dionne
5dd9977628 viced: Make Update_TargetVnodeStatus usable by replication code
Add a remote flag, skip rights related code for the remote case.

This will need to be revisited later; in the case that what ends
up on disk is slightly different than the InStatus passed in, the
changes should be preserved to pass to the replicas.

Change-Id: I596698ba00174efbdc6a170a24f86ea88554f9af
Reviewed-on: http://gerrit.openafs.org/6675
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-10 14:33:48 -07:00
Marc Dionne
37fc2dfbb9 viced: Make GetVolumePackageWithCall usable by replication code
Add a remote flag to GetVolumePackageWithCall to make it usable for
remote replication RPCs.  For the remote case the checks related
to access rights are skipped.

Change-Id: I81db0bb1ae90c5f98cf4e59d9ba28466b312c763
Reviewed-on: http://gerrit.openafs.org/6673
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-10 14:33:32 -07:00
Marc Dionne
74e5f32aac vol: Allow VAllocVnode of specific vnodes
Add parameters to VAllocVnode to allow the caller to specifiy the
vnode and unique numbers to use.  This will be used by the RW
replication code to keep vnode numbers in sync between the master
volume and the replicas.

Adapted from code by Vishal Powar and Derrick Brashear.

Change-Id: Ibaf79aad2b3e7a52802f5e01f7e4c7730c3f5090
Reviewed-on: http://gerrit.openafs.org/6672
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-04-10 12:15:32 -07:00
Jeffrey Altman
46474374e1 Windows: AFSValidateProcessEntry, ullProcessId 64-bit
In AFSValidateProcessEntry(), ullProcessId is 64-bit and must be
printed as an %I64X in AFSDbgLogMsg() formats.

Change-Id: I0e1cd45383c4512eb271c294674bbfe3f0f39bef
Reviewed-on: http://gerrit.openafs.org/7172
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-10 10:37:24 -07:00
Simon Wilkinson
7bab9649aa roken: Add rk_getprogname to Windows mapfile
Add the rk_getprogname symbol to the Windows mapfile so it can be
used by roken consumers.

Change-Id: I77c7db3fcd9136d36e2b17b6250bfcfa6327b0e5
Reviewed-on: http://gerrit.openafs.org/7139
Tested-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-10 10:09:08 -07:00
Simon Wilkinson
bb16c6f38f rxkad: Remove DES include from header file
Remove the hcrypto/des.h include directory from the rxkad_prototypes
header file. We ship rxkad_prototypes.h, but we don't ship the hcrypto
headers. Having an installed header depend upon an uninstalled one is
a pain when building out-of-tree code like perl-AFS.

Change-Id: Idac93ba834c84f6f9e2e49361f88d0e357a328d6
Reviewed-on: http://gerrit.openafs.org/7068
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-10 10:07:36 -07:00
Simon Wilkinson
1e858293d3 rxkad: Move conversion functions to own file
Move the various key conversion functions into thir own header file,
rather than rxkad_prototypes.h. This means we can isolate the dependency
on the hcrypto DES headers (which we don't install)

Change-Id: I8efcbf97b6794d9573f35eec9d4a32e9ff4cf352
Reviewed-on: http://gerrit.openafs.org/7067
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-10 10:07:19 -07:00
Simon Wilkinson
10a7428b79 shlibafsauthent: Add a load more objects
The perl-AFS module needs to link against a pthreaded, PIC, library
that contains all of the routines that it provides perl shims for.
At the moment, libafsrpc_pic and libafsauthent_pic are the only such
libraries that OpenAFS provides.

Add all of the necessary objects to libafsauthent_pic such that the
2.6.2 version of perl-AFS can build with a minimal set of patches.
Minimise the damage by only making these available through the static
version of the libafsauthent_pic library.

Change-Id: I5a2aa5f5fbcfbe15aa7a23c3ab57b34b979ab2f3
Reviewed-on: http://gerrit.openafs.org/7070
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-10 09:30:15 -07:00
Simon Wilkinson
c3dd14759d opr: Install the queue.h header
The opr queue definition is required by a structure in the installed
cellconfig.h header. So that header can still be used by out-of-tree
applications, install the queue.h header too.

Change-Id: Ifaf49d59df24275ff50c215de6a0f40fc2bd2230
Reviewed-on: http://gerrit.openafs.org/7069
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-10 09:29:47 -07:00
Jeffrey Altman
7051672c71 Windows: report error on panic
If afsd_notifier() is called the service is going to exit(1).
Report to the service manager that the service exited with an
error as well.

Change-Id: I88bb2f315016ab17a526d1eab162ccde8beb0dd0
Reviewed-on: http://gerrit.openafs.org/7148
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-10 05:49:45 -07:00
Jeffrey Altman
846cef3685 Windows: correct afsredir log entries
AFSVerifyEntry != AFSValidateEntry

Change-Id: I5b138e121f66724afddde9eadce4c11009ec6ec4
Reviewed-on: http://gerrit.openafs.org/7147
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-10 05:49:20 -07:00
Jeffrey Altman
779c27bf1d Windows: Refactor AFSValidateEntry
Refactor AFSValidateEntry to avoid obtaining the
ObjectInformation->Fcb->Resource when it isn't necessary.
This will avoid contention and improve performance.

The only time that the Fcb->Resource is required is when
the object requires verification, the object is a FILE,
and the object was successfully evaluated.

Even with this reorganization there is a small window
of opportunity for a deadlock to occur if a CcPurgeCacheSection()
which is called with the Fcb->Resource held triggers a filter
driver to issue a CreateFile and in between the two operations
an invalidate object is received.

Change-Id: Iddf64f030c6a608ac29a10b7a9a7e130ae6c4249
Reviewed-on: http://gerrit.openafs.org/7143
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-10 05:48:42 -07:00
Simon Wilkinson
d1e59d2d82 Generalise the new background daemon code
Move the new background daemon code out from under the AFS_DARWIN80_ENV
ifdef into its own AFS_NEW_BKG define. This lets us use it for things
other than the Darwin mv helper, on other platforms.

Based on code originally written by Derrick Brashear

Change-Id: Iba9431f5dc4bbbe10222b25a595cdd1ea2f592f4
Reviewed-on: http://gerrit.openafs.org/7136
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-10 04:27:45 -07:00
Andrew Deason
46bdb318c4 vos: Do not try to remove backup volume id 0
Currently we always try to delete a BK volume if we're deleting the
RW. If the BK volume id is 0, this is never going to do anything, so
don't try to delete it.

Change-Id: I0c003040cface9999944d61637077fce1736445e
Reviewed-on: http://gerrit.openafs.org/7140
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-04-10 04:25:25 -07:00
Simon Wilkinson
5e7e3724fc Import the expand_path.c file from Heimdal
Import expand_path.c from Heimdal so that it can be used for path
parsing with the Windows version of the INI file parser.

Change-Id: I764ea10edb8bb63bd45216c912c0f67597c4467a
Reviewed-on: http://gerrit.openafs.org/7144
Tested-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-10 03:01:49 -07:00
Heimdal Developers
4545abb096 Import of code from heimdal
This commit updates the code imported from heimdal to
ee7340860a22f81fb869cc431efc1fd4e5c77d34 (switch-from-svn-to-git-2542-gee73408)

New files are:
	krb5/expand_path.c

Change-Id: Ib4093b72257f9a0d1a49edb0fe6779908a78cd83
Reviewed-on: http://gerrit.openafs.org/7145
Tested-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-10 03:01:37 -07:00
Simon Wilkinson
3109a66fb2 rx: Remove packet burst elements from peer struct
The peer structure contains a number of elements left over from an
earlier, burst based, congestion control strategy. As OpenAFS has
never implemented this strategy, just remove these elements from
the structure, and store 0 values for these elements in the debug
packets.

Change-Id: Ib50a8ac587890efb483d3c2640ead615d170db34
Reviewed-on: http://gerrit.openafs.org/7006
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-09 16:37:52 -07:00
Simon Wilkinson
aa6f52584e rx: Remove the unused packet skew code
We don't (and haven't, since the release of OpenAFS) use the packet
skew calculations for anything. However, maintaining them requires
taking locks in some critical parts of the transmission code path.
For both speed, and maintainability, reasons remove the skew code
from the tree - it's in git if we ever want to go back to it.

Change-Id: Idc6dc80fb06ca959ad02a85f2c536a94ca3d5c02
Reviewed-on: http://gerrit.openafs.org/7004
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-09 16:37:32 -07:00
Simon Wilkinson
84d09a831a rx: Hide internal packet functions
Hide functions in rx_packet.c which are only used by that file by
making them static.

Change-Id: I22d4be2130cc4a46183254d3ba36c61644891852
Reviewed-on: http://gerrit.openafs.org/7003
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-09 16:37:00 -07:00
Simon Wilkinson
9862ac0dbb rx: Hide struct rx_peer from the rest of the tree
The peer structure is an internal RX structure, so it shouldn't
be contained in public header files, or used by non-rx modules.

Hide the structure definition in rx_peer.h, and convert the
rx_HostOf and rx_PortOf accessors from macros into functions. This
will also help with adding support for non-IPv4 addresses to RX.

Change-Id: I790fa3193bfa629a2872fc5395d0146e76a2de9e
Reviewed-on: http://gerrit.openafs.org/7002
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-09 16:36:45 -07:00
Marc Dionne
f971a36968 tests: remove unused variable in tests/util/ktime-t.c
errors is set but not used - remove it.

Change-Id: I00c99ac8b9c61ab2667aecbdf0fd04401d018bf8
Reviewed-on: http://gerrit.openafs.org/7142
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-09 16:18:24 -07:00
Simon Wilkinson
cc06d00b21 Move configuration parsing into libcmd
Rework the API for directly parsing configuration files and move it
out of util/ and into libcmd, where we can actually make use of it.

This is a raw API - it provides direct access to the parser. The
eventual intent is that this will predominantly be contained within
libcmd itself, which will then wrap this with the more general purpose
Option functions

Change-Id: I9f4a9c373c4123023120f69e595068ead6160507
Reviewed-on: http://gerrit.openafs.org/7132
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-09 15:36:41 -07:00
Simon Wilkinson
e4430d9d48 rxperf: Build again
Fix rxperf so that it builds again

Change-Id: I9747bc1b3fedb96d5bc317acde69f35b1dc6efb8
Reviewed-on: http://gerrit.openafs.org/7011
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-09 13:39:21 -07:00
Simon Wilkinson
91303604f6 roken: Prefix getopt and getprogname
The roken symbols for getopt and getprogname are now prefixed with
'rk_'. Fix the map file so it lists the correct symbols.

Change-Id: I61adba7d5bec3e86b8e29d1eefda23df4ef91988
Reviewed-on: http://gerrit.openafs.org/7010
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-09 13:39:04 -07:00
Simon Wilkinson
80ec5db21d all needs to be first rule in the Makefile
Just running 'make' in a subdirectory will fire the first rule in that
directory's Makefile. When the buildtools rules were added to roken and
crypto, they were put at the start of the file, meaning that they fire
in perference to 'all'

Swap the ordering back so that 'make' does what would be expected

Change-Id: I598a183f42c150a5da724b7403e91f89f74a0109
Reviewed-on: http://gerrit.openafs.org/7009
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-09 13:38:43 -07:00
Simon Wilkinson
46c5aabfc6 bos: Change to using char casts for ka functions
The ka_IsZero and ka_PrintBytes function just use char strings. Cast
directly, rather than going via a helper functions to simplify this
code.

The helper functions add complexity, and additional dependencies which
cause problems with some uses of this code.

Change-Id: I831ff0f8fbecec602d8c2b9112675938facfb06b
Reviewed-on: http://gerrit.openafs.org/7066
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-09 10:04:32 -07:00
Simon Wilkinson
00992c6697 shlibafsrpc: Add additional XDR functions
Export the afs_xdr_pointer and afs_xdr_u_char functions so that
shlibafsauthent can make use of them.

Change-Id: I16cf3f69904bffb3a034fd4052117845c1067a2c
Reviewed-on: http://gerrit.openafs.org/7065
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-09 10:04:20 -07:00
Jeffrey Altman
578cdc35e6 rx: remove peer burst elements from rx/test
Subsequent patchsets will turn rx_peer into an opaque object
and remove the burst elements entirely from the tree.  For
now remove them from rx/test

Change-Id: I728f7b74497701c0ef965009dff5550e1b153696
Reviewed-on: http://gerrit.openafs.org/7130
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-09 06:03:13 -07:00
Simon Wilkinson
01a1b79288 rx: rxi_AckAll isn't an event handler
rxi_AckAll is coded as if it is an event handler, yet the only
call site is a direct call from rx.c. So, rework the function to
remove all of the event handling code, change its arguments to match,
and make it static.

Change-Id: I947c02bf91bf5a3f42d2a389f9393e68f3ccee4b
Reviewed-on: http://gerrit.openafs.org/6999
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-09 05:20:31 -07:00
Simon Wilkinson
a20c489367 rx: Tidy up function scope in rx.c
Rework headers to more clearly indicate which functions in rx.c
are considered part of the 'public' rx interface, and which are for
internal use only.

Move internal functions either to be static in rx.c
(if they are used only within that file), or defined in
rx_internal.h.

Remove entirely the unused function rxi_NatKeepAliveOn()

Change-Id: I878374dc137f4c7e204de4b2d9ca17fa1c5db628
Reviewed-on: http://gerrit.openafs.org/6998
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-04-09 04:54:44 -07:00
Simon Wilkinson
084c2c1687 rx: Remove trailing else from RX_KERNEL_TRACE
The RX_KERNEL_TRACE ifdefs all contain a trailing else, which makes
no logicial sense given the rest of the code. The only effect of this
trailing else is to cause packets to not be sent when tracing is
enabled, which probably isn't the desired behaviour.

Change-Id: I2175b1d8270cd096361f349a467245b49efabf6b
Reviewed-on: http://gerrit.openafs.org/7001
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-04-09 03:51:22 -07:00
Simon Wilkinson
49ddcc3b3e kas: Don't require config for help
Modify the call to ka_Init in kas, so that a fully configured client
isn't required in order to generate help output. In particular, permit
kas -help, kas -version and kas apropos to run without initialising the
ka library.

This fixes a problem with running 'make check' on systems that don't
have an AFS client installed (or where the AFS client is installed in
a different location)

Change-Id: I5edd10a319ed6aee163723f99c4f37183f572b2f
Reviewed-on: http://gerrit.openafs.org/7129
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-08 21:43:50 -07:00
Marc Dionne
9037358b6a tools: return error code in xfclose
The code variable takes the return code from do_close, but
is then unused.  Return its value instead of systematically
returning 0, avoiding an unused variable warning.

Change-Id: I831b5b81721400ee08106d2ecdbf2b7b8e126348
Reviewed-on: http://gerrit.openafs.org/7123
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
2012-04-08 21:14:12 -07:00
Simon Wilkinson
2427cb000c rx: Remove unused ACKHACK macro
rx_globals.h had a macro called ACKHACK which at one point looks like
it was used to determine whether to send an ACK or not. We now have a
more sophisticate mechanism for determining this, and the old macro
doesn't seem to have been used in a long time. So, remove it to avoid
confusion.

Change-Id: I9b17cdca69c903c7a952489791088f2899ac7e60
Reviewed-on: http://gerrit.openafs.org/7000
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-08 21:05:39 -07:00
Simon Wilkinson
2c0ed7ace6 tests: waitpid requires sys/wait.h
Calling waitpid requires the sys/wait.h header to be included to
guarantee that the prototype is enabled.

Change-Id: I2d845236347d1be46cd750c2e766b305a64cde53
Reviewed-on: http://gerrit.openafs.org/7128
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-04-08 18:24:58 -07:00
Simon Wilkinson
02f470e99d tests: rx needs roken
On Linux, the RX library has a dependency on libroken for the rk_socket
function. Add this dependency to the RX tests.

Change-Id: I306e846524232bc136cd969ab1b8664d1c570e2d
Reviewed-on: http://gerrit.openafs.org/7127
Tested-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-08 18:24:20 -07:00
Simon Wilkinson
bdca02dfe7 cmd: Don't leak memory when constructing help string
It's not critical, because we'll be exiting soon afterwards, but just
to be nice, don't leak the name of every command option whilst we're
constructing the help string.

Caught by clang-analyzer

Change-Id: I87fdb2030c6a7c5ad810f2a06820c08cbe2fb18e
Reviewed-on: http://gerrit.openafs.org/7107
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-08 18:23:49 -07:00
Simon Wilkinson
4dc40bade4 ktime: Don't leak token list
ktime_ParsePeriodic generates a malloc'd token list when it parses
the time string passed to it. Make sure that we free this list before
exiting from the function.

Change-Id: I6edacc6504aeec06ede5b5ae36c22f69b0d6cea0
Reviewed-on: http://gerrit.openafs.org/7106
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-08 18:23:32 -07:00
Simon Wilkinson
63f7b0a205 budb: Don't leak memory
Don't leak the malloc'd path variable everytime we call truncateDatabase

Caught by clang-analyzer

Change-Id: I583d81b136113820dab00a6eb35ca8e1aeec2cd1
Reviewed-on: http://gerrit.openafs.org/7105
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-08 18:23:07 -07:00
Simon Wilkinson
39bdcebad7 vol-dump: Don't leak memory
Don't leak a Volume structure everytime we call HandleVolume

Caught by clang-analyzer

Change-Id: Id8cf79dd2178b8647d88f0765ec4ad9d327a23ae
Reviewed-on: http://gerrit.openafs.org/7104
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-08 18:22:50 -07:00
Simon Wilkinson
1b4d2b53cc vol-dump: Make static things static
vol-dump is a self contained object. Make everything in it static to
make clear that these functions are not being used by other objects in
the tree.

Change-Id: I0345c884167ed322fdf7a6e83b77b0ae261b9d8f
Reviewed-on: http://gerrit.openafs.org/7103
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-08 18:22:26 -07:00
Simon Wilkinson
be8d8b7c78 auth: Don't leak key on file parse error
If we fail for any reason whilst parsing the keyfile from disk, don't
leak the key structure which we allocated to store the results of the
parse.

Change-Id: I21a27723f96af9428465134cfb975c83e10da535
Reviewed-on: http://gerrit.openafs.org/7102
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-08 18:22:08 -07:00
Simon Wilkinson
8f39150b27 opr: Flag assertion error handles as noreturn
Flag both of our assertion error handlers as being AFS_NORETURN, so
that static analysers can truncate their decision trees, and avoid
false positives, based on assertion statements.

Change-Id: I511c9c19a714cd3eaa5a886bf9561f577244360e
Reviewed-on: http://gerrit.openafs.org/7101
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-08 18:21:47 -07:00
Simon Wilkinson
d55a5d7080 pts: Don't malloc(0) when there's nothing to do
If GetNameOrId is called with no work to do, then don't attempt to
malloc a load of 0 length strings. Instead just return an empty array
to the caller.

Change-Id: I245cfde71d65b8a3b6df4217b90dad81e9e60a58
Reviewed-on: http://gerrit.openafs.org/7100
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-08 18:21:25 -07:00
Simon Wilkinson
8d497e575c bucoord: Don't malloc(0) if there's no work to do
If there's no work to do, then don't attempt to malloc 0 bytes, and
just return success to the user

Change-Id: I060852a247acb8309c75f3670577561b5a9af591
Reviewed-on: http://gerrit.openafs.org/7099
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-08 18:20:55 -07:00
Simon Wilkinson
54ca22a905 auth: Handle empty lists of keys
Handle the case where a list of keys may be empty - don't attempt
to calloc a 0 length array, and have Put handle the case where the
array being freed has no elements.

Caught by clang-analyzer

Change-Id: I665035cb00a8da411710a71a17ae66545702127f
Reviewed-on: http://gerrit.openafs.org/7098
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-08 18:20:38 -07:00