Make aklog use the new extended ktc set token function when storing
tokens.
Change-Id: I2e84cda2bf8a4c6c9f6627569cae2d34fd7b5c0f
Reviewed-on: http://gerrit.openafs.org/2583
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
assume a new address means we probably have new resolver info; reinit
when we get the callback.
FIXES 126440
Change-Id: I0d5ac0576f2b2e90093b93974b0354cac35d84a3
Reviewed-on: http://gerrit.openafs.org/2622
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
As noticed by a commenter, afs_linux_bypass_readpage needs
the same get_page operation as in afs_linux_bypass_readpages,
as background page accounting assumes we have done it.
Change-Id: Ib2e1cb7ec971e68b022dd1740584369d04b8b833
Reviewed-on: http://gerrit.openafs.org/2626
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
In cases where afs_vop_lookup would return a child vnode
locked, continue to take an exclusive lock, but allow
recursion (LK_CANRECURSE). Allow recursion also at
afs_vop_link, where we specifically encountered a conflict
due to recursion.
Change-Id: I5f5b0979ce3c86e517f96ea60b96ebdd26401acb
Reviewed-on: http://gerrit.openafs.org/2625
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Call afs_FakeOpen in the write path, even though nominally
it is AFS_VM_RDWR_ENV.
Change-Id: I6d24c9631f80058e3dd0d6f284ca7792253ceaaa
Reviewed-on: http://gerrit.openafs.org/2623
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Based on review of bundled filesystems on FBSD and DFBSD,
call vnode_pager_setsize in three unhandled cases (getattr,
setattr, and io growing a file; truncation was handled
correctly already). Following up on a suggestion by Ben
Kaduk.
Change-Id: I05b61c26402bb8ab49ad74b71af2d02b439f959f
Reviewed-on: http://gerrit.openafs.org/2621
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
hcrypto needs the top-level include structure to be present so it
can install its header files. Add a dependency to "config" in
the Makefile to make this explicit and prevent occasional failures
with parallel builds.
Change-Id: If588d6a15fa1fdf371ec2841cc3a6e75077cccb0
Reviewed-on: http://gerrit.openafs.org/2620
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The syscall_register code appears to depend on coordination
with FreeBSD upstream, which hopefully can be completed by
RELENG_9. Use the original code for installation of the AFS
syscall everything older than that.
Change-Id: I2954cf1a2ae3587a311e8133ec5cdc500b4e2e24
Reviewed-on: http://gerrit.openafs.org/2618
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
There is no osi macro osi_curporc. Typo.
Change-Id: I02f151be942471579ca60ed1e2190d0895288e4c
Reviewed-on: http://gerrit.openafs.org/2617
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This change implements the new, XDR based, SetTokenEx pioctl. This
pioctl permits sending multiple tokens, of multiple types, into the
kernel in a single pioctl call. This patch provides a kernel
implementation of the pioctl, and a new library function
ktc_SetTokenEx, which will use either the new pioctl, or fall back
to the old one should SetTokenEx not be available.
Change-Id: Id1e2903e078c549f5675e3d2ecdf53a9bb33f5e9
Reviewed-on: http://gerrit.openafs.org/2582
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The 'vid' element of the unixuser structure was performing two
functions. It was used in debug messages to clarify which user's
token had expired and, in a few locations, to signify whether the
user had tokens or not.
This patch removes this dual usage. 'vid' is renamed to viceId, so
all uses are found and fixed. Where it is used for debugging, it remains,
but we only set the viceId for a user when we first use an rxkad token
on that context. Other uses of 'vid' have been replaced with tests
against the UHasTokens flag in the user's states.
Change-Id: Ifc0306a34fb7360810c792215e55e783f1dd062c
Reviewed-on: http://gerrit.openafs.org/2581
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This generalises token storage in the Unix CM, so that it isn't
rxkad specific. We add a new, dynamically allocated, list of tokens
hanging off each unixuser structure. Each token is expressed as
a discrimated union keyed on the security class of that token,
with the token's details contained within that Union.
All token handling is performed through a set of functions in
afs_token.c - token access is modified to use this interface
throughout the rest of the code.
Change-Id: I939f3a611bb6e991e1e0d075ced0a59fc6f57693
Reviewed-on: http://gerrit.openafs.org/2580
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Use the provided interface, syscall_register(), instead of
manually tweaking the sysent table.
Starting afsd will still fail at present on FreeBSD HEAD
without an additional kernel patch to syscalls.master.
Change-Id: I18db7c8b74dbd114165f7617df25e462cb372e88
Reviewed-on: http://gerrit.openafs.org/2616
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The delay logic needs to follow soshutdown, and precede
soclose. The thread in osi_NetReceive is racing to do
another soreceive. That thread needs to win the race
and notice the socket is shut down before rx_socket is
torn down.
Change-Id: Id8424dcfa2498550a190d277017b7ea15fc11023
Reviewed-on: http://gerrit.openafs.org/2613
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Don't call afs_close when handling VOP_CLOSE on a recycled
vnode, since there was no matching open. This corrects the
opens count, which was seen to go have gone negative in the
reclaim vop. For clarity, assert if afs_vop_close is entered
with a VI_DOOMED vnode and avc->opens != 0.
Change-Id: I511a4f2a924c2f8e20f3ecdaa445fbe803289a47
Change-Id: I1b2307fd3318fa54e8f7fb72a5d3f843e2a38404
Reviewed-on: http://gerrit.openafs.org/2612
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit updates the code imported from the external
heimdal git repository to their revision
4f5390877a6cdb9615cf1f61f1884edc7b91522c
which is described as switch-from-svn-to-git-1447-g4f53908
Change-Id: I8a679232dfb25ba636600264b235667f06a5f62c
Reviewed-on: http://gerrit.openafs.org/2607
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Build 'cacheout' in all builds, so it does not succumb to bitrot.
Change-Id: If00ce1fd9dd49e92caa183dbb54f06b2edc4ece9
Reviewed-on: http://gerrit.openafs.org/2606
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Make src/venus/cacheout buildable again, by fixing several compiler
errors and warnings. Also clean up a few small things, like adding
'static' qualifiers.
Change-Id: I1cd10221a5e13a59227e4915991db6042325b7de
Reviewed-on: http://gerrit.openafs.org/2605
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Turn on the new ubik_BeginTransReadAnyWrite functionality for the
vlserver, which allows us to read data from ubik during a conflicting
ubik write lock. When writing, we now update a copy of the
application-level cache, and write back the changes during a commit.
Change-Id: Ica958af704f40e89c2062e43641d883865613802
Reviewed-on: http://gerrit.openafs.org/2106
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The vlserver application-level ubik cache (which consists of
HostAddress, ex_addr, and cheader) is currently being accessed via
global variables everywhere. Instead, access these via the new vl_ctx
struct that is passed to functions during a transaction, so we have
the ability to modify the cache without making all changes visible as
we change it.
Change-Id: I24bd5495539057d169aef4b5b0b6850b77172cab
Reviewed-on: http://gerrit.openafs.org/2105
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Instead of passing a ubik_trans pointer to many functions inside the
vlserver, pass a vlserver-defined vl_ctx struct, so we can add new
things to keep track of in a transaction that are not part of ubik.
Change-Id: Icf8df6bfdf8960134493ab7f379f0f65b92bdb5a
Reviewed-on: http://gerrit.openafs.org/2104
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add ubik_BeginTransReadAnyWrite, which allows for reading from the
database, even while there is a conflicting ubik write lock. Reads are
still blocked while the local database is updating due to a write
transaction commit.
Change-Id: I025e595ad699d5a969a0676691530d90c65f1920
Reviewed-on: http://gerrit.openafs.org/2592
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
If we are reading while a write transaction is in progress, we can
encounter a buffer that is dirty if we're on the same site as the
writer. Ignore these buffers for readers, since they contain
uncommitted changes. Then, when the writer commits, invalidate the
resultant duplicate buffer, if one exists.
Change-Id: I67e0205362d4c08ea9a8c12104fea8bfe8cbf798
Reviewed-on: http://gerrit.openafs.org/2231
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Abstract the code for matching buffers in DRead, and pass around
ubik_trans pointers instead of ubik_dbase pointers. This changes no
behavior, but makes changing ubik buffer code a bit easier.
Change-Id: Ie98005edb0f0dc008190e709dc08d2cc5ef5e16c
Reviewed-on: http://gerrit.openafs.org/2230
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Some headers generated by rxgen are installed. We can't use
afsconfig.h in installed headers, as it isn't installed (and it
shouldn't be, as it contains autoconf defines which will almost
certainly have namespace conflicts with other packages)
Revert the portion of 972a407 that added afsconfig.h to the
h_output function. This should now be safe as stds.h no longer
relies on the result of autoconf tests.
FIXES 127931
Change-Id: I75645620e46c4f354ca984a8daf99254650133f6
Reviewed-on: http://gerrit.openafs.org/2604
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Variable afs_sys_setgroups32_page is only used when __NR_setgroups32
is not defined. Make the declaration depend on it as well to clear
up an unused variable warning.
Change-Id: I812b98d6ac4bf6ac923553ef3556c90d75d86fcb
Reviewed-on: http://gerrit.openafs.org/2600
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
"char" is unsigned on s390x, which causes a few warnings where we
test for negative values.
Add a signed modifier in a few cases, and in vos.c replace with an
int to match a similar section of code in the same file.
Mostly a warning fix, but in one case the variable could be used
to return a -1 error value, so it may have caused an actual bug.
Change-Id: I005fbcd7c573735df7403316ec0ced67ee81e559
Reviewed-on: http://gerrit.openafs.org/2602
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Move function definitions above their use in quad_cksum.c and
remove the (incomplete) prototypes.
Clears up a few warnings on big endian systems.
Change-Id: Id860f904fff9fb033ee4b2032162304a4af7423a
Reviewed-on: http://gerrit.openafs.org/2601
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Move all of our AC_CHECK_FUNCS calls into a single, ordered, list
so that it's easier to see what's being checked for and what's not.
Change-Id: Ib8e356ada469d4b3be8cc6387df91de21a2d1e8a
Reviewed-on: http://gerrit.openafs.org/2598
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add a configure test for the arc4random function which hcrypto can
use as an entropy source
Change-Id: If1ae243d2f2850be0efd0030a37ac026cdb0e7ba
Reviewed-on: http://gerrit.openafs.org/2597
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Fix the hcrypto build for IRIX, by including param.h in the
configuration header so that the platform specific redefinitions of
"inline" work correctly.
Change-Id: Ib301fae008b596f9112eefe21eaccad0dfd74190
Reviewed-on: http://gerrit.openafs.org/2596
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Some potentially-threaded callers were calling PrintInode with a NULL
first argument, which is not threadsafe. Alter them to use local
storage.
Change-Id: Ib9ad9c070bd659be30616b2c77cd244458357197
Reviewed-on: http://gerrit.openafs.org/2593
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Commit 3d7388b790 broke the windows
build. Fix it:
- SVGParms_t has no salvinfo member, but an svgp_salvinfo member
- Correct the SalvageVolumeGroup prototype to match the actual
implementation
Change-Id: I6515ff8a3850b09e959c95387c3e7c22b40794c1
Reviewed-on: http://gerrit.openafs.org/2595
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Currently, volinodes.h defines an array ('stuff') for easily accessing
information about different inode types. Part of the array points to
parts of a global 'tempHeader' structure, making this not threadsafe.
Change this into an interface which utilizes local storage to make
this threadsafe and remove those horridly-named global variables.
This adds the init_inode_info static inline function, for initializing
a local inode information table.
Change-Id: If4562e724fd7a8e5f8166ea0fe409d6765d0de2b
Reviewed-on: http://gerrit.openafs.org/1869
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reduce the number of globals used in the salvager code, by making
functions pass around a 'salvinfo' structure that contains the
information regarding a particular salvage.
Change-Id: Iba7a6add8c1b8145f531e10495c621a2ba15425d
Reviewed-on: http://gerrit.openafs.org/2250
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add the new XDR symbols which we've recently introduced to the
exports list so they can be used from the shared libraries
Change-Id: Iadc038ad36a673fc71f31eed32ef8979343791e9
Reviewed-on: http://gerrit.openafs.org/2579
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The cm_enforceTrailingDot() function failed if there was a
trailing dot followed by white space.
LICENSE MIT
Change-Id: Ib6a90420459a44b87995c44a5f58fcdcd5041c9f
Reviewed-on: http://gerrit.openafs.org/2588
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit updates the code imported from the external
heimdal git repository to their revision
40ef7759b917648938416e15521d383e2eade5cf
which is described as switch-from-svn-to-git-1333-g40ef775
Change-Id: Ie03ff2d99293272f9ce4c900367eefa063ce8d98
Reviewed-on: http://gerrit.openafs.org/2574
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add the files which we intend to use from Heimdal's hcrypto library
to the list of files which we import from the Heimdal git repo.
Change-Id: I734b77b8fa47617efc05b782eafc00753dce2279
Reviewed-on: http://gerrit.openafs.org/2573
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Make the import script handle multiple, rather than just single,
whitespace separators between source and destination files.
Change-Id: I0cc0fdd6ba1ef4bd5407b2e0fd9285ffe902408b
Reviewed-on: http://gerrit.openafs.org/2572
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>