Maintance an array of up to 32 reader threads that have
acquired a rwlock. Use it for debugging when things go bad.
Change-Id: I2e2e781ff355f1452e991898dfb5b91c47db9e34
Reviewed-on: http://gerrit.openafs.org/5411
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Fix the label in the diagnostics message, it prints "addsite"
instead of "changeloc" when an error occurs during vos changeloc
Change-Id: I8c541bc1709d2c02fb58d6d15b4a66d95647d1e7
Reviewed-on: http://gerrit.openafs.org/5414
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
SYNCHRONIZE has not meaning for AFS so just ignore it. Do not
deny an open request because it is set.
Change-Id: I33fe4a02d0d1ce2cb4d192dd1b2e5f23fda4091c
Reviewed-on: http://gerrit.openafs.org/5410
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
we get the size, then we get it again. no clue why. let's just not.
Change-Id: I430d5c9941043341908cbf50ae70b982bb0ab8b3
Reviewed-on: http://gerrit.openafs.org/5398
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
avoid the "default" API since it's broken. this will at least prompt for
tickets.
Change-Id: Iee566d5f5502b7dce900d833f5711038c984cf37
Reviewed-on: http://gerrit.openafs.org/5408
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
shutdown_rx, unlike rx_Finalize, kills the socket before the conns.
since we call osi_NetSend directly, we lose. just do a simple
check for rxinit_status, and exit immediately before sending if rx
is not up.
Change-Id: Ie34a45a4c1c88fc5732801dcefec89cbc9764f81
Reviewed-on: http://gerrit.openafs.org/5377
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
When tcudbprocs.o is built as part of tbutc, it needs to have the
same warning suppression as when it is built as part of butc.
Change-Id: Ied3a9512676ea929f5acdb80b29875555f69113a
Reviewed-on: http://gerrit.openafs.org/5402
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
At some point, the build lines for tbutc and tvlserver ended up
omitting Darwin platforms. This is incorrect, so re-add Darwin to the
platform list.
Change-Id: I7704eb19a457620b37cbe3d9cbd33d6c9bd3ae5e
Reviewed-on: http://gerrit.openafs.org/5401
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
ignore KRB5_DEPRECATED_FUNCTIONS for now since it doesnt give any
advice. Some keytypes (but not all) have been renamed. So for
now we need to keep both apparently.
Change-Id: I55de284448d255d5107afe03b4df56ccebc90beb
Reviewed-on: http://gerrit.openafs.org/5400
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
This commit updates the code imported from heimdal to
b118610a9c56835c4ac5dc49ce8124cae8078346 (switch-from-svn-to-git-2478-gb118610)
Upstream changes are:
Harald Barth (1):
Move common code to krb5_unsupported_enctype() and make error message contain string instead of error number
Jeffrey Altman (1):
roken: declare IN_LOOPBACKNET if necessary
Love Hornquist Astrand (5):
Warning fixes from Christos Zoulas
Fixes from NetBSD via Thomas Klausner and Roland C. Dowdeswell
Rename subsystem_DEPRECATED to subsystem_DEPRECATED_FUNCTION(X)
remove trailing whitespace
remove warning, remove forward declaration by moving the function up, ident
Love Hörnquist Åstrand (4):
don't set i = 0, its never read
sprinkle doxygen and kode more like the rest of the code base
partly unify enctype/keytype since there is only enctypes
switch to KRB5_ENCTYPE
Roland C. Dowdeswell (1):
Fix a couple of bugs in krb5_c_valid_enctype():
chas williams - CONTRACTOR (1):
hcrypto: var name current conflicts with linux kernel
Change-Id: Id9a7a9ee8258b979b54f4ed2b4175815ab35ea21
Reviewed-on: http://gerrit.openafs.org/5399
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Setting the registry value to 0 can now be used as a
method of disabling the offline volume check.
Change-Id: I9fdc4e960efb0a6793316102ce2794c775693da1
Reviewed-on: http://gerrit.openafs.org/5370
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Newer dkms no longer uses or supplies a $kernelver_array variable;
instead it uses $kernelver. The attached patch uses both, one of
which will be empty, so the test will do the Right Thing regardless
of your dkms version.
Further, the "mv" command at the end of the MAKE[0]= line needs
lots of back-slashes on each of its parms. We need three to make it
all the way to the final dkms.conf file -- so that's six -- plus one
more to escape the '$'; that's seven in all.
In case there's any question (and with all the back-slashes involved,
there should be) about the intent here, the whole point of this
patch is to make the final dkms.conf MAKE[0]= line look like this
(module line breaks:
MAKE[0]="KMODNAME=openafs.ko; DSTKMOD=\".\"; [ \"\`echo
\"${kernelver_array[0]}${kernelver[0]}\" | sed -e
's/^\([0-9]*\.[0-9]*\)\..*/\1/'\`\" = \"2.4\" ] && KMODNAME=\"libafs-*\"
&& DSTKMOD=openafs.o; ./configure
--with-linux-kernel-headers=${kernel_source_dir}
--with-linux-kernel-packaging; make; mv src/libafs/MODLOAD-*/\\\$KMODNAME
\\\$DSTKMOD"
This is what was required to get "dkms build ..." to work on Fedora 15,
and as near as I can tell it shouldn't break 2.4 or other builds.
FIXES 130211
Change-Id: I1f7b3ccb438bb957bb0b97456b23c11cb0b4a41b
Reviewed-on: http://gerrit.openafs.org/5393
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Commit dc077b83c9 moved the afs_event
structure definition into afs_osi.h. However, afs_osi.h is included from
lots of places which don't include a complete set of platform headers.
This means that the use of lck_mtx_t in this file breaks the build on
Darwin.
Instead, define the structure in afs.h, along with all of the rest of
the cache manager structures. Also take the opportunity to move the
definition of shutdown_osisleep it afs_prototypes.h, with the rest of
the prototypes.
Change-Id: Idd19fc30adcb5ab37e65ad87fa9224668e8cd321
Reviewed-on: http://gerrit.openafs.org/5392
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
At the moment, all of the kernel build lines end with "; true", which
means that the build will always continue, regardless of whether
creating an individual object file succeeds or not. The 'true' is there
to gobble up the name of the source file which the common build
infrastructure adds to the end of the command line.
Instead of using '; true', use '&& true', so that if one of the C
compiler commands, or the lipo, fails, we get told about it, before
we try to link the missing objects.
Change-Id: I11c14e6aa12188e3de044f900b3df8c8ffe5df13
Reviewed-on: http://gerrit.openafs.org/5391
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Some functions in libafsutil depend upon the RX libraries, which means
that pulling in other functions in this library can create a dependency
upon RX. This is less than ideal for low-level libraries such as cmd and
comerr.
So, create a new low-level library (currently named 'opr') which can
contain low-level functions from util, and elsewhere. This library
should have no dependencies other than on system libraries and libroken.
Change-Id: I703db3da4d8faf79ee82bf572af09d07152d9b25
Reviewed-on: http://gerrit.openafs.org/5363
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Certain platforms (like ppc64_linux26) compiler options might
affect some autoconf tests. In particular, the ones related to
the size of certain primitive types.
Change-Id: I20c3f737ee4623451bc6cab3f97e86d152cb397f
Reviewed-on: http://gerrit.openafs.org/5366
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
We've never had working NFS translator for IRIX, and the system call
codes which are required to install the symbols used by the IBM
translator have long been used for other things by OpenAFS.
Simplify this mess by just removing the translator stubs from the kernel
module, and all of the code in afsd which used to handle pulling
addresses out of the kernel module so that we can hook ourselves in.
Change-Id: I2da2b0040afc0191e236706126d75bc7d39c0936
Reviewed-on: http://gerrit.openafs.org/5375
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Initialising the KA and cmd error tables in vsprocs.c makes the
libvolser library dependent upon rxkad and cmd. As we may want to
use that library in programs which use neither rxkad, nor our command
processor, this is less than ideal. So, just drop the initialisations.
Change-Id: Ifd47b1b16fc014f969e2b487451e21877b6a5407
Reviewed-on: http://gerrit.openafs.org/5374
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
afsd requires res_init to be declared - get a definition for this by
including roken.h (which has the necessary magic to figure out which
set of headers are required to get resolver functions)
Change-Id: I217405df223f0bc42be90aea991cb228db4da4f0
Reviewed-on: http://gerrit.openafs.org/5373
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Darwin doesn't have a getpassphrase function. Fix the PAM test to
use getpass, in the same way as we do for lots of other platforms.
Change-Id: Ib252174ac1356a8975a9187b252d4fe0246d5d39
Reviewed-on: http://gerrit.openafs.org/5372
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Our included configuration has a perfectly fine .c.o rule, so don't
override it in this Makefile, as all that does is produce a warning at
build time
Change-Id: If8d37f50932124ef0adef64ec23d81e646da337a
Reviewed-on: http://gerrit.openafs.org/5371
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Fixes detection of whether the PAM library uses const on FreeBSD and
possibly others. Report and testing from Julien ÉLIE.
Change-Id: Ice01914f4a00f73e4e473934f4ad907da3a3493f
Reviewed-on: http://gerrit.openafs.org/5376
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
lwp doesnt work since ucontext/setjmp are incomplete when running 32-bit
binaries with the 64-bit kernel.
Change-Id: I9c52d9d934638075fc1693ed94f20665822e5e6e
Reviewed-on: http://gerrit.openafs.org/5365
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
DARWIN and LINUX were already doing this, but everybody else had
a memory leak. Consolidate most of the common code to do so,
including afs_event_t definitions.
Change-Id: I5ec83cf23fd15dbbd5716995c671998e35862843
Reviewed-on: http://gerrit.openafs.org/5314
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
When the RX pthread conversion was done, the initialisation of rxkad
mutexes was incorporated into the rx library itself. This is a layering
violation (it breaks the relatively clean security object abstraction),
and means that you can't actually use RX without the rxkad library.
So, remove all of this initialisation from RX. As security libraries
don't have an explicit initialisation function, we setup our various
mutexes using a pthread_once function called from the NewSecurityObject
functions.
This has the added bonus that it removes the final error in rx.c for
pthread builds, and so another bit of warning suppression can be
removed.
Change-Id: I3cf9b2404a03fb58534c5f41afd77aa5ba5e2256
Reviewed-on: http://gerrit.openafs.org/5361
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Both vsprocs.c and vsutils.c declare the global variable 'cstruct'
(which is initialised by vos.c in order to pass a ubik client structure
through to many of the libvolser functions). This double declaration
prevents libvolser from being linked as a shared library on some
platforms. We only need one of these, so just make vsprocs.c declare it,
and vsutils.c refer to it as an extern.
Of course, using a global variable to pass state around is really quite
nasty, but let's fix that in another change.
Change-Id: Ief1667bd7a5b70dbfb49cdc02cc435eb2344527e
Reviewed-on: http://gerrit.openafs.org/5362
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Checkin I18ed36cc4dce9aa354ad1398710ab7db83c814a2 made strftime
much more widespread. However the %T format is not available on
all platforms and causes (at least) Windows servers to fail on
first attempt to log. %T is just shorthand to %H:%M:%S so this
checkin just replaces the one with the other.
Change-Id: Ibfff133d9263f5513276d96f3624801fd8ab229e
Reviewed-on: http://gerrit.openafs.org/5364
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
The redirector maintains file object state after the afs
service has shutdown in case it is restarted. It is critical that
Freelance FIDs not be reused. Add cm_data.fakeDirVersion into
the mix when generating unique values.
Change-Id: I1cf480d3e0ec6e0b7eadf731a1ef867079c2dc44
Reviewed-on: http://gerrit.openafs.org/5357
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
The processing of the CM_BUF_CMBKGFETCH flag adds more
overhead than it prevents. Get rid of it.
LICENSE MIT
Change-Id: Ic152707fd3f0a7592409a5f570c02488f5503a9c
Reviewed-on: http://gerrit.openafs.org/5359
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Instead of dropping the lock for read and reacquiring for write
use lock_ConvertRToW() which will make the change atomicly if
it is possible or place the thread into the wait list if not.
LICENSE MIT
Change-Id: I5d134f045a0c935fdaaef6edf5bdf37bb0418a98
Reviewed-on: http://gerrit.openafs.org/5360
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
strlen(filepath) when !filepath isnt going to work very well. i believe
this to be the intent of the author of the original patch.
Change-Id: Ib78c5a189b6980223946aff9cf027419127c35bd
Reviewed-on: http://gerrit.openafs.org/5328
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
The d_delete dentry operation now takes a const argument. Test for
this and define our function accordingly to avoid warnings.
Change-Id: I621f54d8e8182b29ccfdf82798773800f5870064
Reviewed-on: http://gerrit.openafs.org/5335
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Separate mappings apply for the afs redirector. Add a boolean
parameter to the function signature that is set true when the
call requires the redirector mapping.
Change-Id: Ib2892b6c78047f3f1d289e31c4236ea90d8026ab
Reviewed-on: http://gerrit.openafs.org/5351
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Permit the caller to request the cm_scache_t that represents
the created symlink or mount point object.
Change-Id: Ida8fdc4214844dad009362877f125aa5d20120a1
Reviewed-on: http://gerrit.openafs.org/5355
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
The buffer free list least recently used queue has both
head and tail points. Use the proper versions of the queue
mgmt functions and do not handle edge cases as special cases.
Change-Id: I570682ef1cd6801f1467c4b1af40ae6591a33862
Reviewed-on: http://gerrit.openafs.org/5354
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
add cm_req_t object to background daemon operations in order to
permit request source to be propagated to the background daemon.
pass a cm_req_t into buf_SetDirty().
Change-Id: I8f805c2860e33df37040ee3785f18358e1a9b762
Reviewed-on: http://gerrit.openafs.org/5348
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Previously, the libuafs build created a symlink from h to
/usr/include/sys so that files included under h/* by kernel source
files could be found in the normal system header location. However,
this assumption about the system header location is no longer valid.
Debian and Ubuntu systems with multiarch have arch-specific include
paths so that the same host can be used to build 32-bit and 64-bit
binaries with different system headers, and those include paths are
automatically searched by the compiler. This means some standard
headers are no longer found directly in /usr/include/sys but are
instead found in /usr/include/<arch>/sys.
Using a stripped-down version of similar code for building the kernel
module on Linux, create an h directory containing stub header files
that just include the relevant system <sys/*.h> header file instead.
This allows the compiler to implement its normal internal header
search algorithm.
Also remove all the other symlinks, such as sys, netinet, etc., that
just pointed to the same directories under /usr/include. We can assume
the normal compiler search algorithm will find these headers without
requiring this assistance.
Change-Id: Ie19d12e3d3f0068c88d0a9c83f6a96d51baee018
Reviewed-on: http://gerrit.openafs.org/5305
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Just add a comment explaining that an OPEN FdHandle_t does not count
against the ref count for its parent IHandle_t. Recently I've seen
some confusion about this when discussing ihandle internals, and this
should make this abundantly clear.
Change-Id: I73210e0d05869827ba99d09f504052d1a6797669
Reviewed-on: http://gerrit.openafs.org/5317
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
With the earlier directory verification changes, every directory
was seen as corrupt, because the nde pointer was never being initialised
Rework the way that we check for the failure of afs_dir_GetVerifiedBlob
so that we can more robustly detect problems, whilst still allowing
normal directories to be browsed as before
Change-Id: I3d3f428025296956b5feff6ba290aaef79817dcd
Reviewed-on: http://gerrit.openafs.org/5318
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
The afs backing_dev_info structure is allocated dynamically with
kmalloc, which doesn't zero out the contents. In particular
there's no guarantee that congested_fn is NULL, causing spurious
oopses when bdi_congested tries to call it.
Change-Id: Ieeed870905627a132a0d1bd2f15cf80443b36303
Reviewed-on: http://gerrit.openafs.org/5334
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
The fsync file operation gets new arguments to specify a range.
Add a configure test to check for the API change.
The inode lock is also pushed down into the operation, so we need
to take it ourselves to keep the original behaviour.
Change-Id: Icf4e152ce52f2b32c99920f83a5cc3136c05d2cd
Reviewed-on: http://gerrit.openafs.org/5332
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>