Commit Graph

10079 Commits

Author SHA1 Message Date
Simon Wilkinson
6f20e9ddc2 Mac OS: Fixed shared library symbol issues
Some of our shared libraries (in particular, roken) build with different
symbols in them depending on the exact configuration options for a
particular platform. This means that not all of the symbols in the map
file may be present within the library. On Mac OS X we have been working
around this by using the "-flat_namespace,-undefined,suppress" linker
options.

However, with Lion this no longer works, as the linker still expects to
find the symbol in the library whose mapfile indicated that it was
present. So, for example, we end up with errors like:

dyld: Symbol not found: _errx
  Referenced from: openafs.git/tests/rx/../../src/tools/rxperf/rxperf
  Expected in: openafs.git/lib/librokenafs.dylib.1.1

... despite errx actually being provided by the system libraries.

The fix to this is to use the default two level namespace, and change
our behaviour for undefined symbols to 'dynamic_lookup', rather than
'suppress'

Change-Id: Ide37856198a8db3d42ee0a5261d097176bcc9301
Reviewed-on: http://gerrit.openafs.org/7242
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-18 20:26:36 -07:00
Simon Wilkinson
9dca26ac19 tools: Move dumpscan into its own directory
Move dumpscan into its own directory, so that it's Makefile rules can
be better contained, and not pollute the whole 'tools/' namespace

Change-Id: Ic58d007824ab802eae469dd2996300f80671a3b8
Reviewed-on: http://gerrit.openafs.org/7239
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-18 12:44:17 -07:00
Michael Meffie
0dd7c980ac audit: remove static local realms
Remove the static list of local realms and use the
auth interace to do the local realm check. A callback
function is registered by the servers to avoid a circular
dependency between audit and auth.

Change-Id: Ic0f25cd79da7987704de68bade14054490b26c80
Reviewed-on: http://gerrit.openafs.org/6879
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-18 11:12:40 -07:00
Michael Meffie
8a040cfd84 viced: remove static local realms
Use the new auth function to do the local realm match
check instead of static local realms lists.

Override the krb.conf file with the -realms command line
option.

Change-Id: Ic364e61b03385fbc9496ac4af3877a1fdee3a3a5
Reviewed-on: http://gerrit.openafs.org/6878
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-18 11:12:03 -07:00
Michael Meffie
9ddf9eca56 ptserver: remove static local realms
Use the new auth function to do the local realm match
check instead of static local realms lists.

Change-Id: I8b509188103916bdd2e575e5e9a14e3671b81e65
Reviewed-on: http://gerrit.openafs.org/6877
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-18 11:10:47 -07:00
Michael Meffie
d85ece0977 auth: remove static local realms
Remove the static list of local realms and use the auth
interface to perform the local realm match check.

Change-Id: I0f56e7974e59035eb9bf9fb343b550ab6b7ef314
Reviewed-on: http://gerrit.openafs.org/6876
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-04-18 11:10:15 -07:00
Simon Wilkinson
8e62ddaa37 rx: Use native 64bit data counters
Modify the peer, call and rpc_stats structures to use native 64 bit
types for the bytesSent and bytesRcvd data counters. All of our
platforms support native 64bit quantities now, so there's absolutely
no value in rolling our own.

Change-Id: I7c51de73be17821c6472eea535c8476fe0d7a23e
Reviewed-on: http://gerrit.openafs.org/7205
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-17 16:21:31 -07:00
Derrick Brashear
c83e1ae680 aklog: heimdal kvno is rapidly changing
in 1.6 it's unsigned. in 1.5 it's signed.
it's 32 bits. i don't care. just copy the darn thing.

Change-Id: I51efd2be64eac108e5b1591643f24fd0a51bfdff
Reviewed-on: http://gerrit.openafs.org/7235
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-04-17 06:39:46 -07:00
Jeffrey Altman
0ac28aa703 Windows: Drop Fcb Resource across SetEOF and SetAllocation
If the file size or allocation is being altered, we must hold
the PagingResource and drop the Fcb Resource.  Dropping the
Fcb resource is necessary to avoid a deadlock with TrendMicro's
filter if the size is set to zero and acquiring the PagingResource
is necessary to prevent races now that the Fcb Resource is no
longer held.

Change-Id: Ie72a018adc52c479a4bb2469b2b1abe317644e8b
Reviewed-on: http://gerrit.openafs.org/7224
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-16 18:37:08 -07:00
Jeffrey Altman
fd161ec0e4 Windows: Hold PagingResource across ExtendingWrite
When the file allocation size changes the PagingResource must
be held exclusively to prevent races.

Change-Id: I6ff3a2061563dbb858bb284b463913f6d3b33e7a
Reviewed-on: http://gerrit.openafs.org/7223
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-16 18:36:52 -07:00
Peter Scott
8e1490f579 Windows: AFSProcessOverwriteSupersede CcSetFileSizes
Instead of calling CcPurgeCacheSection() in AFSProcessOverwriteSupersede()
as part of the file length truncation to zero, call CcSetFileSizes().

Wait to call CcSetFileSizes() until after the Fcb->Resource has been
dropped but while the Fcb->Header.PagingIoResource is still held.
Make sure that file sizes are restored in the Fcb->Header if the
afsd_service rejects the file update.

Change-Id: I7574e80781ac1dbbe69814c69644bb3825de9b6a
Reviewed-on: http://gerrit.openafs.org/7220
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-16 18:36:40 -07:00
Michael Meffie
f8b759b63f auth: local realms configuration
Add krb.conf and krb.excl support to the auth cell configuration
library.  Provide a function to determine if the user is local to the
cell.  Provide a function to set the local realms during application
initialization.  These changes are intended to replace the functions
afs_krb_get_lrealm and afs_is_foreign_ticket_name.

Change-Id: Iba57e9ffc2c958f3a4565a9352ce172189276ce9
Reviewed-on: http://gerrit.openafs.org/5744
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-04-16 10:31:04 -07:00
Simon Wilkinson
a3ff62857c rx: Remove surplus call to FindPeer
When stats are enabled, rxi_ReadPacket calls FindPeer immediately
the packet is received from the wire. The peer structure that it
gets is used solely to increment a counter, and then thrown away.
Given that FindPeer requires a lock, and a hash lookup, this is
really inefficent.

Instead, delay the compilation of statistics until rxi_ReceivePacket.
Call FindPeer for version and debug packets which have no associated
connection otherwise wait until we have found the packet's connection,
and use the peer which is linked from there.

Change-Id: Ic2eb08e52b97d6b033b9d3de59da9346e012d70d
Reviewed-on: http://gerrit.openafs.org/7206
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-16 08:58:19 -07:00
Andrew Deason
660720d1f5 rx: dec rx_nWaiting on clearing RX_CALL_WAIT_PROC
Currently, a couple of callers (rxi_ResetCall, and
rxi_AttachServerProc) will decrement rx_nWaiting only if
RX_CALL_WAIT_PROC is set for a call, and the call is on a queue
(presumably rx_incomingCallQueue). This can cause an imbalance in
rx_nWaiting if these code paths are reached when, in another thread,
rx_GetCall has removed the call from its queue, but it has not yet
cleared RX_CALL_WAIT_PROC (this can happen while it is waiting for
call->lock). In this situation, rx_GetCall will remove the call from
its queue, wait, and e.g. rxi_ResetCall will clear RX_CALL_WAIT_PROC;
neither will decrement rx_nWaiting.

This is possible if a new call is started on a call channel with an
extant call that is waiting for a thread; we will rxi_ResetCall in
rxi_ReceivePacket, but rx_GetCall may be running at the same time.
This race may also be possible via rxi_AttachServerProc via
rxi_UpdatePeerReach -> TryAttach -> rxi_AttachServerProc while
rx_GetCall is running, but I'm not sure.

To avoid this, decrement rx_nWaiting based on RX_CALL_WAIT_PROC alone,
regardless of whether or not the call is on a queue. This mirrors the
incrementing rx_nWaiting behavior, where rx_nWaiting is only
incremented if RX_CALL_WAIT_PROC is unset for a call, so this should
guarantee that rx_nWaiting does not become unbalanced.

Change-Id: I7dba4ba5f7cc33270c2d0f486b850fc0391927d1
Reviewed-on: http://gerrit.openafs.org/6986
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-04-16 08:47:06 -07:00
Jeffrey Altman
6a9b0d8c56 rx: conn_call_lock leak
In rxi_ReceivePacket, if the packet is for a client connection
and there is no call allocated, the conn->conn_call_lock was
leaked.  Introduced by 95c38dff37.

Change-Id: Icfc10849c1da08d7c96d139b0a10d9ffe7ee57df
Reviewed-on: http://gerrit.openafs.org/7218
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-16 06:52:53 -07:00
Michael Meffie
15cde0e40d auth: get local cell internal function
Add an internal function to retrieve the local cell
name when the auth mutex is already held. Implement
afsconf_GetLocalCell in terms of the new internal
function.

Change-Id: I2f021a9966129e8e256b61d5219e7315b904ac0e
Reviewed-on: http://gerrit.openafs.org/6875
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-04-16 06:03:07 -07:00
Jason Edgecombe
c242c5a4ae TESTS: Add the libwrap script to "make check" to handle library paths
LICENSE MIT

Change-Id: I5f77d8703a163b8b9224f64010b9e008bb386c59
Reviewed-on: http://gerrit.openafs.org/7202
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-16 06:02:53 -07:00
Jeffrey Altman
56a2cbb5fb Windows: pioctl use GetFileAttributes
Instead of attempting to CreateFile(OPEN_EXISTING) the _._AFS_IOCTL_._
file, try using GetFileAttributes() to obtain the attributes of the
file.  The file doesn't exist in the directory listing but the
afs redirector and the afs smb server will respond to the request.
Perhaps the SMB servers in the broken printers will fail it.

Change-Id: I792bcc89c63871043ce6835a971de284fd754d54
Reviewed-on: http://gerrit.openafs.org/7210
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-15 06:56:57 -07:00
Jeffrey Altman
718a6a0c46 Windows: _._AFS_IOCTL_._ hidden and system
Query file attributes returned only the system attribute
and not the hidden attribute.  Must return both.

Change-Id: Id29465adf3e3524b59c63b2e6f8ef482f536a0e1
Reviewed-on: http://gerrit.openafs.org/7209
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-15 06:56:42 -07:00
Jeffrey Altman
3cdfdc4792 Windows: Remove PurgeContent param AFSVerifyEntry
When verifying a directory entry we must update the metadata
for a file therefore we must also purge the data if the version
number changed.  This is not optional.

Change-Id: Icb673c7a6c52b3778978248fcb243d110685aa8d
Reviewed-on: http://gerrit.openafs.org/7208
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-14 17:58:57 -07:00
Jeffrey Altman
ead0a45827 Windows: Flush data and then drop locks
The redirector must flush the data to the file server
and then drop the file locks.  Doing it the other way
creates races.

Change-Id: Ic3a48546ee9e0066df9d228fc4e57f52b43587c2
Reviewed-on: http://gerrit.openafs.org/7207
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-14 17:58:01 -07:00
Michael Meffie
dcefc45760 Build: check for gencat
Check for the gencat program and give a missing warning if
not present.

Change-Id: I71cdaa0840215b53071be4481a5f23b2f8667bda
Reviewed-on: http://gerrit.openafs.org/7203
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-04-13 17:46:38 -07:00
Michael Meffie
c11d1c0319 Build: error if solariscc is not found
Fail configure if the solariscc is not found and give the builder
a message to cope with non-standard installation paths for
sunstudio.

Change-Id: I64c1e752833f2aa824f4a15cc144e54bb03a1ec8
Reviewed-on: http://gerrit.openafs.org/7204
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-04-13 17:46:30 -07:00
Simon Wilkinson
a187be182c rx: Rework code which pulls packet from recv queue
Both rxi_ReadProc and rxi_FillReadVector contained copies of the
same code to pull a packet out of the receive queue, and turn it
into the call's currentPacket. Abstract this out into a single common
function, so we're not maintaining the same code in two different
places.

Change-Id: I20af6b4ff19f05e21ffde1a80609be12ad6cfeee
Reviewed-on: http://gerrit.openafs.org/7195
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-13 17:42:24 -07:00
Simon Wilkinson
7b45d62ec1 rx: Tidy up currentPacket handling
Instead of making a copy of the call->currentPacket variable in our
read/write routines, reference it directly. Make it clear that
currentPacket is used solely by the application thread, and remove
a number of mistaken comments that suggest otherwise.

Change-Id: I7ad799acbf110422df7c1e18ab552caf26b7766a
Reviewed-on: http://gerrit.openafs.org/7194
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-13 17:39:14 -07:00
Derrick Brashear
e6105fcd33 aklog: heimdal kvno is unsigned
heimdal's kvno is unsigned. comply.

Change-Id: I5960ec33dccb10ae2bbc121e231b6aa58fa17993
Reviewed-on: http://gerrit.openafs.org/7201
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-12 20:13:38 -07:00
Simon Wilkinson
83b76f564b Remove redundant header includes
Remove includes of system headers where roken.h already takes care of
including them. This simplifies the source tree, reduces the amount of
work done by the compiler, and ensures that all of our headers are
included with the correct guards

The list of files to edit was generated with the following script:

list=`grep include external/heimdal/roken/roken.h.in                \
         | sed -e's/#include//g' | sort | uniq`;                    \
for A in `find . -name *.c | xargs grep -l roken.h                  \
             | grep -v external/ | grep -v WINNT/`; do              \
     found=0;                                                       \
     for B in $list; do                                             \
         if grep "$B" $A > /dev/null; then                          \
              echo "$A : $B";                                       \
              found=1;                                              \
         fi;                                                        \
     done;                                                          \
     if [ $found == 1 ] ; then mvim -f $A; fi;                      \
done

Change-Id: I2edbda550a129709b1dc6860b17d6a8a7509af58
Reviewed-on: http://gerrit.openafs.org/5815
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-12 14:14:14 -07:00
Michael Meffie
03ec768fa6 volscan: index offset output column
Add index offset as a possible volscan output column.

Change-Id: I1bf6e8dc3c506a2ee013536e19141ddb214879a6
Reviewed-on: http://gerrit.openafs.org/6980
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-04-12 08:24:56 -07:00
Michael Meffie
22fbed08a6 volscan: option to ignore dir vnode magic
Option to ignore directory vnode magic when looking
up the path names. Print which vnode failed when
doing the checks.

Change-Id: Id4b74ee9f139305025b849a007a4534b8ed04dbf
Reviewed-on: http://gerrit.openafs.org/6979
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-04-12 08:24:48 -07:00
Jeffrey Altman
ed8b38d1d0 Windows: missing brace in RDR_CleanupFileEntry
Fix 46d76d8821

Change-Id: I6c6cf5e1dec431544963f6a4c283e2ae0d52a7d9
Reviewed-on: http://gerrit.openafs.org/7189
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2012-04-11 12:11:39 -07:00
Andrew Deason
df522b5883 salvager: Trust inode-based special data over OGM
Currently the salvaging code looks for special inodes, and infers the
volume id and inode type from the OGM data in each special inode file.
However, we can already derive this information from the inode number
itself for the special inode, so if they disagree, use the values
based off of the inode number and correct the OGM data.

The inode number should be more likely to be correct, since that is
how we look up the special inode from the header when attaching the
volume. It is also impossible to get special inode files with the same
name, so this ensures we don't get duplicates. And for people that go
snooping around /vicepX/AFSIDat even though we tell them not to, it
seems more likely that they go around 'chmod'ing or 'chown'ing rather
than 'mv'ing.

This change avoids an abort in the salvaging code when the OGM data is
wrong. If we trust the OGM data when it is incorrect, we assume the
special inode file is for a different volume. So when we go to
recreate one of the special files for the volume we're actually
working with, the IH_CREATE fails (from EEXIST) and so we abort.

Change-Id: Ibfaa1bfb27d190c5fec6fc673d88df366268e302
Reviewed-on: http://gerrit.openafs.org/6946
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-11 11:47:01 -07:00
Andrew Deason
0594fc80b4 namei: Abstract out OGM functions a bit more
Add GetWinOGM and SetWinOGM for getting and setting the
Windows-equivalent of the Unix OGM data. Make those and CheckOGM use
GetFileTime/SetFileTime so we can operate just via an FD_t, without
needing the full pathname. Modify the NT namei_icreate to use
SetWinOGM.

Change-Id: I5077911d8473d44ad9ba1d17d3b6deec3a12ba39
Reviewed-on: http://gerrit.openafs.org/6945
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-04-11 11:46:47 -07:00
Derrick Brashear
4c8a3cd789 libafs: dont handle outstatus on write error
if a write errored, we can't trust the OutStatus we got. don't.

Change-Id: I74934c32426c6f25aace06f6ee59c1c1b547af90
Reviewed-on: http://gerrit.openafs.org/6714
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-11 09:04:43 -07:00
Michael Meffie
7a650025c5 Build: link libaudit before util
libaudit depends on util symbols, so link it first to avoid
unresolved symbols.  Include libaudit in the list of libs
instead of making it a special case.

Change-Id: Ide6d5f7e3ce8fd76b504088dcae3110872a87092
Reviewed-on: http://gerrit.openafs.org/6847
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-11 09:03:32 -07:00
Michael Meffie
ef6ae1e7ed viced: fix log message for MapName_r
Do not log a code of zero if the name plus instance length exceeds
the max pr name buffer.

Change-Id: I8b8f970213c0beb35a728bcc2158796f84120a3b
Reviewed-on: http://gerrit.openafs.org/6861
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-04-11 09:02:37 -07:00
Michael Meffie
bc770a5007 doc: distributed files are under dest
Add the dest path component in the quick start guide instructions for
copying files from a binary OpenAFS distribution file.

Change-Id: I5c39ac0426ef2eab89ae5d3df260628e949dc21e
Reviewed-on: http://gerrit.openafs.org/7187
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-04-11 08:57:50 -07:00
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