With OpenBSD 4.7, the ia_subnet and ia_subnetmask fields have been removed
from the in_ifaddr structure as part of a cleanup that considers them
unnecessary. Thus, the version of afsi_SetServerIPRank() that OpenBSD was
using no longer compiles. On the other hand, the Darwin version of this
routine seems suited to OpenBSD's needs since it doesn't use those fields
so we'll use that version for OpenBSD 4.7 and above instead.
Change-Id: I27333056378a023e175bddeb637288fc6d1b6e88
Reviewed-on: http://gerrit.openafs.org/3405
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The value in sin->sin_addr.s_addr that's assigned to myDstaddr in the
Darwin version of afsi_SetServerIPRank() is in network byte order but
really needs to be in host byte order.
Note: This patch assumes that change I66f5c790d8c55b359e3550b6d71f3abe040a2820
has been previously installed. The patch fails otherwise.
Change-Id: I3078da1efb94f87f84dbe357f3272d908818256b
Reviewed-on: http://gerrit.openafs.org/3402
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The macros rx_ifaddr_address, rx_ifaddr_netmask, and rx_ifaddr_dstaddress
all expand to a call to memcpy() which returns the destination address as
its return value. The test in the DARWIN version of afsi_SetServerIPRank()
for completion when using this macro, however, seems to assume that success
returns zero, which is wrong and results in myAddr, subnetmask, and
myDstaddr always being set to zero. This patch corrects this behaviour.
Change-Id: I66f5c790d8c55b359e3550b6d71f3abe040a2820
Reviewed-on: http://gerrit.openafs.org/3401
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
If CODESIGN_TIMESTAMP is not defined, permit code signing
to occur but do not ask signtool to contact a timestamp
server.
Change-Id: I801264192caaf871225b001c6f96c0317e115578
Reviewed-on: http://gerrit.openafs.org/3393
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Check for the existance of the mountpoint before trying to
start.
Change-Id: I56c7a69b2b24c465f987e33c3f88c6ac37e40dd0
Reviewed-on: http://gerrit.openafs.org/3392
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Tests show that cache bypass doesn't scale very well past a few
concurrent processes, with a lot of lock contention in the RX
layer. Switching the implementation to the iovec based rx_Readv
alleviates much of this.
Also take advantage of the fact that the upper layer readpages
only sends down contiguous lists of pages, and issue larger read
requests and populate the pagecache pages from the iovecs we
get back. The loop logic is changed significantly to accomodate
the new pattern.
Read throughput is improved by about 30-40% for some parallel read
benchmarks I use. Along with some other tweaks, it can allow the
throughput to be more than doubled.
Change-Id: I56877ec15eba035429bd4ea32731687c862f151f
Reviewed-on: http://gerrit.openafs.org/3375
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
and provide an option not to.
Change-Id: I3a81de0c4786cfc9e5d4b92bb175528ed1334b90
Reviewed-on: http://gerrit.openafs.org/3315
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
When a portion of 'vos release' takes long enough that a transaction
on one or more RO sites times out, it retries to release to those
sites. However, it does not take into account the situation where the
transaction on the original RO clone has also timed out, which it
usually will have if we took a long time to get to the ForwardMulti
stage for any reason.
Add a check to see if the clone RO transaction has timed out, and if
so, recreate the transaction on it. Check if the volume appears to
have changed at all, and if it has, bail out.
Change-Id: I7dd69c83e41216246e40159e8d9c1417e15355f4
Reviewed-on: http://gerrit.openafs.org/2726
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The NSIS installer at present is 32-bit only. Production releases
of OpenAFS have always been performed using the CL=1310 compiler
so it wasn't noticed that src/WINNT/install/NSIS/NTMakefile did
not define the ARCH (architecture) for the purpose of identifying
which redistributable runtime library installer should be
integrated into the build. For the CL=1310 compiler there are
not prebuilt installers for OpenAFS to integrate.
Change-Id: Ide80d5013f55dbcd97b7b099de7066c5afd0df14
Reviewed-on: http://gerrit.openafs.org/3388
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
ntbuild.bat defines AFSDEV_BIN which is set to the list of
directories from which executables required for the build
process will be executed. However, this value was never used
to modify the PATH environment variable. Make it do so.
Change-Id: I3ac65a7ceea54cbcf1d2c41f6b0e7af9de960224
Reviewed-on: http://gerrit.openafs.org/3387
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Presently, the used curses-library are determined by OS.
The leads to a build error when no curses-headers are installed.
Use configure to test if curses.h or ncurses.h is present.
ncurses takes precedence over curses.h.
If neither the curses- nor ncurses-libs are available, do not build
afsmonitor and scout.
A summary at the end of the configure should make this clear to
everyone.
The variable TXLIBS has been renamed to LIB_curses.
Change-Id: I3f661e0b6199be41818dc22149b061e3d599b77f
Reviewed-on: http://gerrit.openafs.org/3345
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This adds the complex structure Table to libafsutil.
All binaries linking to libafsutil can use this to store their output
in the table. This table can be sorted by a predefined column.
The available output formats are ASCII, CSV and HTML.
Change-Id: Id0a00d996a94fee08538226317c60e5bf5082051
Reviewed-on: http://gerrit.openafs.org/1970
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add param.foo.h and sysname entries for the past and forthcoming
FreeBSD 7.2, 7.3, 7.4, and 8.2 releases. Also update the
MakefileProto.FBSD.ins that need touching, simplifying the libuafs
one in the process.
Change-Id: I6a7ff217572daac96f6fa6eb104eb7b1305c5ff6
Reviewed-on: http://gerrit.openafs.org/3389
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Only declare 'p' if it will be used; other unused variables;
signedness mismatches.
Kill spl with fire.
Change-Id: I03ada8b358f64342bc61bdef03df9dfecc550a6b
Reviewed-on: http://gerrit.openafs.org/3200
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add the necessary options for the Solaris Studio compiler to enable
more warnings, when specified in the ./configure invocation.
Change-Id: I30e2a4a4bddad6beb4c50c3e10775c09916bf0df
Reviewed-on: http://gerrit.openafs.org/3367
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Currently we are always specifying e.g. CFLAGS_NOUNUSED as -Wno-unused
when we think we are compiling with gcc. Since autoconf always tries
to use gcc when possible, this breaks the build if we have a gcc
available but we use another cc for building.
This should be fixed otherwise, but in the meantime at least make this
only happen if warnings are actually turned on, so the build is less
likely to break with a default ./configure invocation.
Change-Id: I65d859db1fc0bb0930092fa8cfd6a0577d1c6ce2
Reviewed-on: http://gerrit.openafs.org/3366
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Our librokenafs.map file contains symbols that we may not actually
define, since the list of exported symbols varies depending on the
platform's capabilities. This causes errors during linking, which can
be suppressed by marking all symbols as "= EXTERN". Do so by having
shlib-build modify the mapfile at link-time, when -i is specified to
indicate ignoring undefined symbols.
Change-Id: I043fca6c8206a19fb7bddbc8e624baeaaff3ab00
Reviewed-on: http://gerrit.openafs.org/3365
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Remove some #defines for s_host and similar things. They are not used
anywhere, and they can cause warnings for e.g. s_host being redefined.
Change-Id: Ibb549bde4428304c39a67fbfee507e5234a21546
Reviewed-on: http://gerrit.openafs.org/3364
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Some platforms will give errors for the vol package glock not being
defined in VOL_CV_TIMEDWAIT, since some utilities include volume.h
(with pthreaded ubik enabled) but do not have the vol glock. This
isn't a problem for the other CV_WAIT (et al) macros, since, being
macros, they are not expanded if never referenced. Since
VOL_CV_TIMEDWAIT is a static inline function, however, and at least
some platforms try to compile/link it even if it's not referenced.
So, move it to volume_inline.h, which is only used by the volume
package itself, where we will have the vol glock.
Change-Id: I3e1513869c03d16d274c23e0bbb075df85d6d3a3
Reviewed-on: http://gerrit.openafs.org/3363
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
afsd.fuse requires -lafshcrypto and -lcrypt, so link to them when
linking.
Change-Id: Id4bd4caf5e187a1394a62761a1c19caeeeb041cc
Reviewed-on: http://gerrit.openafs.org/3362
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
The linktest utility calls crypt(3), and needs -lcrypt on some
architectures. Provide the $(LIB_crypt) argument in the makefile
as appropriate.
Change-Id: I47b54fa80839062908df2d0a423ad72a628c1e76
Reviewed-on: http://gerrit.openafs.org/3376
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Prevents occasional failures with parallel builds by ensuring
libafsauthent is built before aklog, which needs it.
Change-Id: Ibb0bdda3ce1fa306dfee1343e0b8b97486ee5efb
Reviewed-on: http://gerrit.openafs.org/3386
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chaz Chandler <clc31@inbox.com>
Tested-by: Chaz Chandler <clc31@inbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
It can be helpful to know that an interrupted transaction was replayed
on startup, and this should be rare. So log a message when that
happens, indicating what db version we replayed to.
Change-Id: I8b2562dea2811190d1a45ba47f362a2441f39dfa
Reviewed-on: http://gerrit.openafs.org/3385
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Commit eec0d94f51 fixed the transaction
replay log code to correctly identify valid transaction logs on
little-endian systems, but missed ntohl'ing the database label read in
a LOGEND opcode. Fix that, so the database is labelled correctly when
replayed from a transaction log.
And while we're here, actually pass a struct ubik_version* to
adbase->setlabel, to make it a little more clear what's happening.
Change-Id: I7edc33a4539f3b2fa342335c08f958b5dfb97f57
Reviewed-on: http://gerrit.openafs.org/3384
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Extend the userok interface provided by the auth library to permit the
addition, deletion and inspection of identities within the UserList.
A number of additional functions are added, as direct replacements for
their Kerberos v4 only counterparts - these are:
*) afsconf_DeleteIdentity
*) afsconf_GetNthIdentity
*) afsconf_AddIdentity
*) afsconf_SuperIdentity
In addition, a new function is added to allow the status of any given
identity to be queried
*) afsconf_IsSuperIdentity
New form identities are stored within the same UserList file as
Kerberos v4 identities. We take advantage of the fact that the current
code skips any entry with a leading whitespace. Identities are stored as
a single line, with a leading space, followed by the integer
representation of their type (0 for Kerberos 4, 1 for GSSAPI), followed
by the base64 encoded representation of their exported name, followed by
the display name of the identity. Each field is whitespace separated.
For example:
1 BAEACwYJKoZIhvcSAQICAAAAEHN4d0BJTkYuRUQuQUMuVUs= sxw@INF.ED.AC.UK
is the representation of the GSSAPI identity "sxw@INF.ED.AC.UK"
An addition to the test suite is also provided which will test all of
the existing, and new super user manipulation functions.
Change-Id: I50648bb1ecc3037a90d623c87a60193be4f122ff
Reviewed-on: http://gerrit.openafs.org/3355
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Only compile the afs_bypasscache.c code if AFS_LINUX24_ENV is set,
since it's currently the only case where the code is actually used.
Only sections that caused problems for UKERNEL were previously
ifdef'ed.
Besides making the code cleaner, the main effect of this change
is to prevent compiling most of the bypass code for UKERNEL where
it isn't currently used.
If support for bypass is added for other platforms eventually, the
code here would need to be reworked anyway, ideally abstracting out
and moving any OS specific bits into the platform subdirectories.
Change-Id: If39294926ea38896ce2dedd1e46b2da0d622cae5
Reviewed-on: http://gerrit.openafs.org/3374
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Compile cache bypass code unconditionally under src/afs/LINUX
since it is now always enabled. Also remove syslog messages
about a "cache bypass patched module" when loading and unloading
the module.
Change-Id: Id83487fe9704c5be8a70fc7c60dfe4d864ab27cf
Reviewed-on: http://gerrit.openafs.org/3373
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Since AFS_KMAP_ATOMIC is defined unconditionally, remove the ifdefs
and the code for the !AFS_KMAP_ATOMIC case. We probably don't want
to support this feature on a kernel old enough not to have kmap_atomic.
This should exist on all 2.6 and even 2.4 linux kernels.
This simplifies the code for maintenance and later changes.
Change-Id: I5d111d65066990123db917ac105a5a14db3b305f
Reviewed-on: http://gerrit.openafs.org/3372
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
uss. Usually the text added was a copy of a CAUTION section that
had already been added in a few places. This change applies it
consistently across all uss-related man pages. In pod1/afs.pod that
text would be excessively wordy; a briefer note is used there to
direct the reader to the full text.
This is a partial fix for RT bug #128018. It does not fully close
the bug; the AFS Administrators Guide needs to be updated as well.
Change-Id: Id64646d20a9b22c0e11c9654842fa255fb4258ea
Reviewed-on: http://gerrit.openafs.org/2637
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
This commit updates the code imported from heimdal to
5b91f58f350c92fb9eacd1ebac558381b0b8deac (switch-from-svn-to-git-1705-g5b91f58)
Upstream changes are:
Simon Wilkinson (1):
hcrypto: Remove getarg.h include from validate.c
Change-Id: Id59ef59c0f521d1266789afb6ee9555319472770
Reviewed-on: http://gerrit.openafs.org/3382
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Now that we have roken integrated build src/rx/tests as a
standard part of the build.
Change-Id: Ic2e6e9229f92c302bd4cfaa173c6d1b5e15d9b55
Reviewed-on: http://gerrit.openafs.org/3324
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Since the windows build of roken is a dynamic library we must
define ROKEN_LIB_DYNAMIC so that roken.h will specific the
correct values of ROKEN_LIB_VARIABLE, ROKEN_LIB_CALL, and
ROKEN_LIB_FUNCTION.
Change-Id: I93a14f355d2f1984722d64fcca14336e1c1ec4d9
Reviewed-on: http://gerrit.openafs.org/3380
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Since the function was renamed, modify the export list
Add rk_optarg, rk_optind, rk_opterr.
Change-Id: I19ffdba5df79293d6a07c9ae6ba476dd77027843
Reviewed-on: http://gerrit.openafs.org/3377
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
This commit updates the code imported from heimdal to
0cc7b890e2632a7cb26517825deb802f79e838f8 (switch-from-svn-to-git-1702-g0cc7b89)
Upstream changes are:
Asanka C. Herath (3):
Annotate exported variables in getopt.c
Windows: Support building roken as a DLL
Declarations for getopt externs
Simon Wilkinson (1):
roken: getopt should include roken.h
Change-Id: I5ef850bcac7dace3a8206958783ed6fd5830492e
Reviewed-on: http://gerrit.openafs.org/3378
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
When building roken the library must be built with different
ROKEN_LIB_xxx macro values than when the library is being
linked against. In particular, ROKEN_LIB_VARIABLE needs to
be exported when building and imported when linking.
Change-Id: I353c796a81fb92e5066d76a269d8371150d4756c
Reviewed-on: http://gerrit.openafs.org/3330
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
In bg-fcrypt.c the bswap32 macro has a name conflict with roken.
Rename it to octetswap32.
Change-Id: I1466c2abb4883c8856962b232859e49014a04796
Reviewed-on: http://gerrit.openafs.org/3361
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
On Windows, roken.h defines iov_len as len and iov_base as buf
so that it can use _WSABUF as the iovec structure. This has negative
consequences when there are local variables iov_len and iov_base
as the same time as there are variables len and buf. This was the
case in bg-fcrypt rxkad_EncryptPacket and rxkad_DecryptPacket.
As a result, rxkad compiled cleanly but did the wrong thing.
This patchset renames iov_len to ilen and iov_base to ibase in order
to avoid this issue.
Change-Id: Iede2d249b6399fed3e718e782b9bf1315fada93b
Reviewed-on: http://gerrit.openafs.org/3350
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Add the strsep function (as rk_strsep) to the OpenAFS roken build.
This function is required by Windows, and is now checked for on Unix.
Change-Id: I71d8e11a30c34aaa89d85d1e6e527d594d5734af
Reviewed-on: http://gerrit.openafs.org/3371
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Add Heimdal's roken strsep implementation to the list of files
to import into our repository.
Change-Id: I27a5f6b95e434a630c0278fc0362dbda6af1321a
Reviewed-on: http://gerrit.openafs.org/3369
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Install the base64.h header, and add the base64_encode and
base64_decode functions to the library
Change-Id: If0ed8fb13cecb6f4a48b4208fbef8c800a5284d5
Reviewed-on: http://gerrit.openafs.org/3354
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>