When detecting if we have certain Linux kernel features, we only
include dcache.h. On some kernel versions (at least 2.4.27),
compilation fails if we include dcache.h directly (due to e.g.
list_head not being defined), which causes false negatives in tests
such as the test for dcache_lock. If we instead include fs.h, which
includes dcache.h, the tests succeed when they should succeed. So, use
fs.h instead of dcache.h.
Change-Id: I43fbbc7e5a952d9effbbac16adb9891c36f729bd
Reviewed-on: http://gerrit.openafs.org/3989
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
We should not need to prototype calloc() anymore and osi_Assert() has
been replaced with assert() apparently.
Change-Id: I3ef6178c589cabcd0637cd88c35d2276833b4590
Change-Id: I0626475f120ff9a373e0251f3c4485c052922747
Reviewed-on: http://gerrit.openafs.org/3991
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
It is unused and has been removed by upstream.
Since we don't particularly need it for older versions, remove
it unconditionally.
Change-Id: If209f7d11d5f4aa4ba77f934d865c905761b05ca
Reviewed-on: http://gerrit.openafs.org/4020
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
pic_regex.o was renamed as regex_pic.o in
commit 43b8bcf2a7c7dfd855a9f2bf274a93289a4941c6, but osconf.m4's
definied of REGEX_OBJ_PIC wasn't updated at the same time. Fix that.
Change-Id: I4523f99d94f158329e8e0eccde575733d28fbf51
Reviewed-on: http://gerrit.openafs.org/4021
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Use the new centralised LWP_CCRULE, rather than brewing our own.
Change-Id: I3eda193371c28972a048f3c0c125d10161420fd7
Reviewed-on: http://gerrit.openafs.org/4016
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Document the behavior and potential problems with granting 'il' rights
to create dropboxes. Do this in the manpage for 'fs setacl' and
chapter 4 of the User Guide.
Change-Id: Ic4e8ee016290080d78037a5c2c3802ce4e2e342c
Reviewed-on: http://gerrit.openafs.org/3977
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
There's a standard mechanism for defining a RPMs target
distribution in the Fedora and RedHat worlds. This is to use the
%{dist} macro, and to insert it at the end (not the beginning) of
the release field.
Move over to using this standard mechanism, and modify the build
system to match. Note that this means that RPM names have now
changed slightly.
Change-Id: I5a4f1ad827223f48658f595ac424ab64fe98ed39
Reviewed-on: http://gerrit.openafs.org/3981
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Checking if the /afs directory exists only makes sense for the kernel
afsd. The libuafs afsd does not care if the mount directory actually
exists on the machine or not, since it may not interact with the mount
directory path on the local machine at all.
So, make the mountdir check code be a new afsd function
(afsd_check_mount), and have it stat() the mount directory only in the
kernels-specific afsd.
Change-Id: Ic0b524e23f518c4f3c9954e6b9614bca984306a3
Reviewed-on: http://gerrit.openafs.org/3980
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
just try to give up callbacks at shutdown. at this point if
you're running 1.4.5 or older, you're sad anyway.
Change-Id: I7d9e9f1de45980f064bccaab338499789aa40646
Reviewed-on: http://gerrit.openafs.org/3404
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
These functions are mostly identical except for the arguments and the
called operation. Move as much common code as possible to an iterator
function and a return code check function. The DISK_WriteV case is
treated a bit differently since it can fall back to using DISK_Write.
This reduces code duplication and shoud simplify maintenance and
future changes. There should be no functional changes.
Change-Id: If2f88c670da47eaad4baa81975ecc307013f5ce8
Reviewed-on: http://gerrit.openafs.org/3970
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
if you're writing files as anonymous, don't let them be read back.
things which potentially need to page back in will just have to be
authenticated, or lose.
Change-Id: I71a6096239eb59b40a9df09460e8db160e9342da
Reviewed-on: http://gerrit.openafs.org/3901
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add a -p option to shlib-build option to generate "plain" shared
objects. That is, shared objects that are intended to be e.g.
dlopen()'d, and are not intended to be libraries dynamically linked to
from other code. Such shared objects do not need a library name,
version numbers, export lists, etc.
Change-Id: I649c1b697a79936c1d580199291124398b05e56b
Reviewed-on: http://gerrit.openafs.org/3975
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Commit 1f1545dfb708b6f70065da58b44676b8eafef772 made it so the
argument given to -mountdir sets the internal mount directory.
However, afsd.fuse assumes that the mount dir is always /afs
internally. So, use the uafs_setMountDir function to reset the
internal mount dir to "/afs", so afsd.fuse can work with non-/afs
mountpoints.
Change-Id: I985f1a25d04af4027c7adef69231e2f56e026d24
Reviewed-on: http://gerrit.openafs.org/3979
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Replace the function uafs_mountWithDir with uafs_setMountDir, and
adjust the one caller. This allows libuafs users to manually set the
mount dir after e.g. the mount dir is set from afsd options.
Change-Id: I85a967ce27a72f54c1ab29b007dbb8634017c897
Reviewed-on: http://gerrit.openafs.org/3978
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Be more consistent with the rest of the tree, and name PIC object
files with the convention foo_pic.o.
Change-Id: Ib3b9642534c51ffb10fe3c86f779b4e9df6af4c1
Reviewed-on: http://gerrit.openafs.org/3968
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Commit 8eca6a1153eb7768c2f29ea2d48f01f6988cbfe3 just used -fPIC to
generate position-independant code. However, the flag to turn on PIC
varies depending on the compiler, and is not always -fPIC. Just use
SHD_CCRULE instead, which will get us the correct PIC flags.
Change-Id: I61d698587cc3959b35ec27abe3c3b19adab5d8f1
Reviewed-on: http://gerrit.openafs.org/3962
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add explicit LWP, PTH and SHD variants of the CCRULE variable for
LWP, pthreaded and shared-library builds respectively. This allows
Makefiles which support building more than one target type to use
these rules directly, rather than brewing their own.
Modify all of the AFS_CCRULE definitions in the build type specific
Makefiles to reference these rules, so we aren't specifying things
twice.
Change-Id: I79bb394cca8971ce71b10ef55b75d5169bf6b80c
Reviewed-on: http://gerrit.openafs.org/3966
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
OLD_URECOVERY is never defined and only serves to preserve unused
code.
Change-Id: Iefc0fcfd177fa134a74cee05b0b45e6bf075ad1c
Reviewed-on: http://gerrit.openafs.org/3969
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
For some reason, uafs_Setup accepts a parameter specifying the AFS mount
point, and we effectively ignore any -mountdir option specified in the
string arguments. Allow -mountdir to override the mount point specified
in uafs_Setup, by changing afs_mountDir &co during afsd_mount_afs().
Change-Id: I4ea88923c0a8392d280c1a8f0ca4d3adf741f7f6
Reviewed-on: http://gerrit.openafs.org/3897
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Previously, we only enforced the calculated lwp/thread maximum when
the -p argument was specified. When -L was specified, we set lwps to
128, which can be over the max of (effectively)
MAX_FILESERVER_THREAD-FILESERVER_HELPER_THREADS, depending on the
value of MAX_FILESERVER_THREAD.
Instead, enforce the lwps min/max after all code to set the lwps has
run.
Change-Id: Ia9fc29855e74631509ea558cfe1b17fcf46e900e
Reviewed-on: http://gerrit.openafs.org/3903
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add the necessary mechanisms to build Heimdal's libkrb5/crypto_*.c in
the kernel. This provides the kernel module with a RFC3961
implementation.
In theory this could also be used to provide a RFC3961 implementation
on top of an EVP-based crypto library in userspace, but at the moment
we're just using Heimdal directly for this.
Change-Id: Ie57391da0dabd2dca8b305e23f0c0faa056a4675
Reviewed-on: http://gerrit.openafs.org/3948
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add the Heimdal files which are necessary to produce a kernel rfc3961
implementation to the import list.
Change-Id: If080207cd882b277548f503e5eb139fe9a54f495
Reviewed-on: http://gerrit.openafs.org/3946
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit adds the files which are necessary to support hcrypto's
EVP interface to the Unix cache manager build. Only a small number
of EVP ciphers and hashes are currently supported -
* aes_128_cbc
* aes_256_cbc
* sha1
Note that the EVP interface is the only supported mechanism to use
the AES cipher - directly calling the underlying crypto functions
is not recommended and may break at any time.
Change-Id: I662073e578b29db1707c6b6433209e75e4db455d
Reviewed-on: http://gerrit.openafs.org/3945
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add a new osi file to the cache manager. This file includes functions
which interface hcrypto with the kernel's own cryptography library.
At the moment, the only such function is osi_readRandom which returns
a block of random data from the kernel's PRNG.
Change-Id: Ib728f5bb638ef634efe4822da24bb7cca723983f
Reviewed-on: http://gerrit.openafs.org/3944
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Some "make"s get tripped up by recipe lines starting with anything but
a tab character. Most of the time we start ours with tabs, but fix a
few instances where they begin with spaces.
Change-Id: I2c17c68deb1b7641ca73e84ec0043b62ce3c54ba
Reviewed-on: http://gerrit.openafs.org/3961
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Commit 335ccb4082657b7d0e4e9af1076356cf115642d2 removed the OS_READ
and OS_WRITE definitions for non-namei code. We need those definitions
to build the pread/pwrite emulation functions, so put them back in.
This allows us to build the inode fileserver backend when we do not
have native positional I/O.
Change-Id: I3c066dacbee20301b38f074142cb6b6bb6b05de7
Reviewed-on: http://gerrit.openafs.org/3959
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add rules to autodetect the location of a system's GSSAPI libraries,
using the gssapi.m4 script from rra-c-util 2.6
Change-Id: Idabb8fdb138a2dac6983aa4d5fd8a2f558ee08be
Reviewed-on: http://gerrit.openafs.org/3943
Tested-by: Christof Hanke <christof.hanke@rzg.mpg.de>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Some versions of HP-UX have the pread() and pwrite() functions, but
they behave in odd ways; most notably, ignoring the offset argument
when _FILE_OFFSET_BITS is defined to 64.
This is noted in recent gnulib documentation
<http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/posix-functions/pwrite.texi>,
and slightly less clear references to pread() being broken can be
found on the development mailing list for git itself.
It is not completely clear what specific HP-UX versions are affected
by this. An autoconf run-time test may also be insufficient, because
the same binaries should be usable on machines with broken and
non-broken pread() implementations. So, to be safe, disable positional
I/O on HP-UX unconditionally.
Change-Id: I09b8d9c441622c961d1df90fe27eeccaa948f5c4
Reviewed-on: http://gerrit.openafs.org/3949
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Fix a mistake with the definition of rx_atomic_set, and add
the missing declaration of rx_dec_and_read for Linux kernel builds
Change-Id: Ieed7a369670c051abc02d8cc831e8736969fb67a
Reviewed-on: http://gerrit.openafs.org/3942
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
On Red Hat systems, /etc/init.d is a symlink to /etc/rc.d/init.d. We
should use the actual path for packaging the init scripts, to avoid
any issues with package verification.
Change-Id: I476193b3fd534c8aa70c67970bf2765a30f4c4d5
Reviewed-on: http://gerrit.openafs.org/3625
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Build a libuafs that is built with PIC, so it can be used in shared
libraries on all platforms. Also build PIC variants for libafsutil and
libcmd, since we need them for a PIC libuafs anyway.
Change-Id: I017fa22c3b4dd661123ea92da7b3e5b69ee5c170
Reviewed-on: http://gerrit.openafs.org/3896
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Extend the KeyFile API so that we can support arbitrary numbers of
different key types, each with their own key version numbers and
sub types. Completely rewrite the KeyFile implementation with this
in mind, but implement all of the "old" API in terms of the new one.
Given that the existing KeyFile is modified by third party programs,
we retain that as the storage location for all afsconf_rxkad keys.
Only keys with a type of 1, or above are stored in the new extended
keyfile.
Change-Id: I903a1de938544541a1bfecedb2a039ba24bdfdbc
Reviewed-on: http://gerrit.openafs.org/3772
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
A fairly thorough review of all sections to ensure that the information
is up to date.
Significant reformatting caused by XML editor.
Change-Id: Iad988b91091a02a7b5de2a1d1fae052fc5ee897f
Reviewed-on: http://gerrit.openafs.org/3936
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
d_count is now an int protected by the dentry's d_lock.
Take the lock when we use it, instead of using an atomic_*
function.
Change-Id: Ib70e4a5315cc343518fa983e47bc7ff925acfc7f
Reviewed-on: http://gerrit.openafs.org/3883
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
GetIoctlHandle() is used to construct the magic pioctl file
path used to initiate pioctl operations with the cache manager.
The first error introduced double directory separators. The
second error was testing an uninitialized value which could
have resulted in a missing directory separator.
Change-Id: I4e863b854ea12b69858be712455dc6b6a0d36c39
Reviewed-on: http://gerrit.openafs.org/3925
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
When processing a request to make a symlink or a mount point
in the afs root volume (\\AFS) the smb redirector will fail
the request because a server name by itself is not a valid path.
Therefore, we insert the "all" share component to refer to the
root volume as a valid path. \\AFS\foobar becomes \\AFS\all\foobar.
A recent change stripped the trailing slash from the string
returned by Parent(). This broke the test that determines
whether or not the provided path that failed the IsAFS() test
is in fact referring to the \\AFS server and requires the insertion
of the "all" share name.
This patchset permits the test to work with \\AFS or \\AFS\
and removes extraneous directory separators from the generated
path containing the "all" share.
Change-Id: Ia3b28d83302d9737bd149b4a22bc3ee3a6c8da46
Reviewed-on: http://gerrit.openafs.org/3924
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
The action portion of the rule for thread_pool_types.h was missing,
so the file was never installed. As that file is a dependency for the
whole of the util directory, it would result in util being completely
rebuild with every make invocation.
Add the missing installation rule, so we don't rebuild quite so often!
Change-Id: Idb201c239b6b37a25567cf231059ef05536fc258
Reviewed-on: http://gerrit.openafs.org/3921
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Restore the + in the scout Makefile section, lost with commit
4a6a00d6.
Lets scout benefit from a parallel make and avoids a warning.
Change-Id: Ie4c35c93afae4bfefaae0a0db9d676200cb3ee7b
Reviewed-on: http://gerrit.openafs.org/3910
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
If a write transaction is running concurrently with a read transaction,
a DRead in the write transaction may return a clean cache page brought
in by the read transaction, instead of a previously written dirty page
from the same transaction. This can result in loss of the written data.
Fix by making sure there is not a dirty version of the requested page
before returning a clean one.
Bug spotted by Jeffrey Hutzelman.
Change-Id: I20543693c98218d8ec1f791508d9404043819376
Reviewed-on: http://gerrit.openafs.org/3764
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Handles replies as soon as they arrive in rx_Multi, limiting
strain on RX packet queues on massive rx_Multi loops.
Change-Id: I345f7dba1707beeb75bcc65bb519afb9dc741973
Reviewed-on: http://gerrit.openafs.org/3765
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
dcache_lock is gone in 2.6.38, and some of the vfs locking rules
have changed.
Of interest for openafs:
- inode->i_lock protects the d_alias list
- dentry->d_lock protects d_unhashed()
Add a new configure test for dcache_lock, and replace its use by
the appropriate new lock(s).
Change-Id: Ic8d860d4f9f6438e966c15f5178c0d82343e3e1c
Reviewed-on: http://gerrit.openafs.org/3771
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The permission i_op has a new signature with a flags argument, and
must now deal with RCU path walking.
- Fix existing configure test for this i_op, it succeeds when it
shouldn't
- Add a new configure test for the new signature
- Make our permission i_op "RCU-walk aware" - return ECHILD if
called in that mode
Change-Id: I42a171694717f4621f29f9f59e4f6049926862a3
Reviewed-on: http://gerrit.openafs.org/3770
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>