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>
rx_identity_new was failing to record the type of the identity,
resulting in all identities being marked as Kerberos v4.
Change-Id: I35058a3db14874b64d3cad2ffd43db371c34aebe
Reviewed-on: http://gerrit.openafs.org/3353
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Change the behaviour of the rx_identity_copy function so that it
copies the whole identity, not just the contents. Add a new function
rx_identity_copyContents which just copies the contents of an identity
into an existing identity structure.
This restores symmetry with the free and freeContents functions.
Change-Id: I692ac8434b1538c283a8ae713956be8ae67cccfd
Reviewed-on: http://gerrit.openafs.org/3352
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Previously, we called afs_PutVCache(afs_globalVp) directly. This
is unsafe because PutVCache acquires locks which can sleep, losing
the serialization of the GLOCK. In rare circumstances, this can
result in two threads simultaneously making that call, and the
second one would panic in vputx() with a negative refcount.
Close the race by using a local variable for the afs_PutVCache()
calls, applying the change to afs_globalVp before dropping the GLOCK.
While here, fix up other race conditions.
Change-Id: Id62f27d4469a96c9becd9b031125bd6c910c3e9b
Reviewed-on: http://gerrit.openafs.org/3275
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
the if [] needed a space before the ]. fix it.
Change-Id: If53524e0c70cccf64b9a53d11a81deebf2c972ec
Reviewed-on: http://gerrit.openafs.org/3357
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Modify kerberosSuperUser so that it can support callers passing NULL,
rather than just empty, instance and cell strings
Change-Id: Ifc21eb0c4f562d65519e31db32723c3a2d19b363
Reviewed-on: http://gerrit.openafs.org/3351
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
compiling failed, because of -Wunused-value.
Use the return code of wstandout and wstandend and pass
it upwards.
Change-Id: I6ae101edb36e31247ff772f5dc59104eb7856138
Reviewed-on: http://gerrit.openafs.org/3344
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Make the commit message produced by import-external-git.pl also report
which files the script added and removed. Whilst this information is
available from the patch itself, having it in the commit message makes
it much easier to tell what happened when reviewing history through
git log.
Change-Id: I59e7deb0f4f1e8c22d07222e1789c66c65612992
Reviewed-on: http://gerrit.openafs.org/3334
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
building with "./configure --enable-checking --enable-supergroups"
fails, because on 64bit, the casting in map.c gives a warning.
Just add another ifdef and cast according to the size of a pointer.
Change-Id: Icb35d79f56cf8fec48c863061a524f9e29e6acd8
Reviewed-on: http://gerrit.openafs.org/3341
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
fms in bu_utils is not using curses at all.
Just remove the dependency from the Makfile
Change-Id: I6d02e60508a2c9b5eb2290c3bf2f9e4ee164fde0
Reviewed-on: http://gerrit.openafs.org/3342
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
aklog.c defined S_ISDIR() which is now defined by roken.h
krb4 declared the types uid_t and gid_t which are defined by roken.h.
There is no mechanism to disable the declarations within the krb4
header (conf-pc.h) even those the declarations were never required
by the Kerberos v4 DLL. The patchset hacks the in tree local copy
of the kfw\inc\krb4\conf-pc.h header to avoid the conflict.
There is still an annoying warning due to kfw\inc\krb4\krb.h
providing a conflicting prototype for gettimeofday() but the
function is not used within aklog so there is no harm from it.
Change-Id: Icbb326bf8e703957cf4ce9bc991075b90aff6f08
Reviewed-on: http://gerrit.openafs.org/3337
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
roken defines replacements for getaddrinfo, freeaddrinfo,
getnameinfo, and freenameinfo which are provided by winsock.
Add HAVE_xxxx macros as required to prevent roken substitution
from taking place.
Change-Id: I2308f63d78234893a8d5031bf6237cabd5d46bd9
Reviewed-on: http://gerrit.openafs.org/3336
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
param.i386_w2k and param.i386_nt40 were not updated for libroken
as part of e2b4fde0b5
Change-Id: Iffb5504150ac46ab430d72ac623c7e2d0fbe39dc
Reviewed-on: http://gerrit.openafs.org/3335
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
If the checkbox IDC_TRAYICON is not present in the dialog,
do not attempt to use its value as a setting for
Config_SetTrayIconFlag().
FIXES 128591
Change-Id: Iebee8198ec25e1841f6fa49b9850a16329f2cbdd
Reviewed-on: http://gerrit.openafs.org/3331
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>