The recent hcrypto pullup added a depedence on the errx() function,
which isn't present on Irix. Solve this by pulling in a load more
of libroken, in order to provide this function.
In the long term, libroken should get split out into its own
directory, and the ability to use a previously installed
libroken should be added. For now, this will hopefully get Irix on
its feet again.
Change-Id: I0642f80079e113403cbef6eca03ca652616ddc61
Reviewed-on: http://gerrit.openafs.org/2904
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
the test for this build feature is reversed. by default, the value for
with_linux_kernel_packaging will not be defined which makes the existing
test pick MPS='SP' instead of LINUX_WHICH_MODULES. based on the configure
help messages, this would appear to be an opt-in not an opt-out.
...
Optional Packages:
...
--with-linux-kernel-packaging
use standard naming conventions to aid Linux kernel
build packaging (disables MPS, sets the kernel
module name to openafs.ko, and installs kernel
modules into the standard Linux location)
...
Change-Id: Ie16fba165e6c85b7ecbce887badb9ffc06a3a7a8
Reviewed-on: http://gerrit.openafs.org/2869
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Add support for an atomic type, and atomic operators for RX. This
builds on work which has already been done for Windows, where
InterlockedOperations are used for statistics gathering.
A new opaque type, rx_atomic_t is introduced so that normal arithmetic
operations will fail on atomic data.
An implementation using native atomic methods is provided for Darwin,
Solaris and Windows. A native kernel implementation is used for Linux.
Where OpenAFS is built with a sufficiently modern gcc, gcc's atomic
primitives will be used. Sadly, gcc's builtin operations are not
available for i386, they will only be used with builds the set
-march=i486 (or later).
Otherwise, we fall back to a single mutex which protects all atomic
operations.
Change-Id: I5f69677a80617e3936f82b177cd58250a6dbf31f
Reviewed-on: http://gerrit.openafs.org/2858
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Add an implementation of dirfd to our local roken implementation for
platforms that don't have one.
Code taken from Heimdal.
Change-Id: I4284c18430b6f49200886f5340191a14dcf34b57
Reviewed-on: http://gerrit.openafs.org/2608
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
When available, use POSIX positional read and write
calls in the ihandle package. Originally written
by Derrick Brashear and Andrew Deason.
Change-Id: I29a9d830872cb920e8ed5820e33d3cbcb7247460
Reviewed-on: http://gerrit.openafs.org/1562
Tested-by: BuildBot <buildbot@rampaginggeek.com>
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>
acinclude.m4 now has struct label support detection and sets
HAVE_STRUCT_LABEL_SUPPORT in afsconfig.h. Obviates complicated
ifdefs in various src/afs/ and src/rx/ files. Must run regen.sh
to generate new configure and afsconfig.h.in, then configure will
detect label support and set afsconfig.h appropriately. Not sure
what to do for Windows, but should be a step in the right
direction.
Fixes issue with compilation of libuafs on IRIX and sunpro by accurately
detecting label support.
Change-Id: I092eda47c4cfcc2517dc39f5e48b5038c413cb01
Change-Id: I2ff8449b28db645d9cfd27796b5f89e5c328a2b2
Reviewed-on: http://gerrit.openafs.org/2516
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
In 2.6.36, the delete_inode and clear_inode inode operations
are replaced by evict_inode.
Rename our current clear_inode to evict_inode, and add a few
things that were previously handled by the generic delete_inode.
This is required for 2.6.36.
Change-Id: I68d75830b43df710ccce173ab36f3bb39074c59e
Reviewed-on: http://gerrit.openafs.org/2544
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
As part of changes to the truncate sequence, inode_setattr() no
longer exists, and all filesystems have to define the setattr op
so we can assume that it is not NULL.
Introduce a compat inline function afs_inode_setattr that hides
the tests and the different versions from the main code.
Note that the existing test for the inode_setattr() return type
will fail, but the value is no longer used in that case.
This is required for 2.6.36
Change-Id: I2f5e8a0b660b48453d0152b6c4db64e57539f91a
Reviewed-on: http://gerrit.openafs.org/2543
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
don't enable kernel pmtu, don't collect errors.
a report from Marc Dionne suggests there are still issues here
Change-Id: Ib54fa522ba53efe50e8f08b27422ebfc8af7f9e5
Reviewed-on: http://gerrit.openafs.org/2538
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Force using an absolute path for install-sh. Autoconf normally prefers
using a relative path, which confuses (at least) part of the libafs
build system.
Change-Id: I6962e61bb866362f674708e611ff22eb190a771a
Reviewed-on: http://gerrit.openafs.org/2461
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Check to see if we need to explicitly include a library in order
to get the crypt() function
Change-Id: I9bd1d70e420d4d1656bd86cd3215525102fa6259
Reviewed-on: http://gerrit.openafs.org/2404
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
if we can get a socket error to let us get pmtu discovery info,
use it.
Change-Id: I7756c1a00e6cb018146a5b0545bed828446e5483
Reviewed-on: http://gerrit.openafs.org/2400
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
if we're flex, we may need to be lex-compatible. engage
it if we're flex
Change-Id: If9a39ca0bce3f4a68b742d1e8f0c679d3f79896e
Change-Id: I7f245d579bcc46fdd0aa7202bbd45f3f9f647ebc
Reviewed-on: http://gerrit.openafs.org/2399
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
can't eject the ifdef yet as this is not fully portable now.
however, just enable it always.
Change-Id: Ia7a49a10377f308740ebd42027ac9748b073016e
Reviewed-on: http://gerrit.openafs.org/2396
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
make dumptool in test suite compile on macos again
Change-Id: Id60f625ce53bc9695673b68c733fa653521a8122
Reviewed-on: http://gerrit.openafs.org/2387
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This generalizes the use of the exportfs API and file handles
to open disk cache files for all 2.6 kernels.
Code outside of src/afs/LINUX (ex: afsd) can assume that file
handles are used for all 2.6 kernels and can use AFS_LINUX26_ENV
to check.
Within src/afs/LINUX/osi_file.c, NEW_EXPORT_OPS can be used to
determine if the old exportfs API (pre 2.6.24) or the new one
applies.
All traces of the LINUX_USE_FH define are removed.
FIXES 127530
Change-Id: I6803101c56981f9f674cef581f7299656723fdf3
Reviewed-on: http://gerrit.openafs.org/2260
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>
Using unix domain sockets for FSSYNC has been the default for some
time now; make it clear from the configure help output that this is
the case.
Change-Id: Ibe8b41361242d6cea035b7710910d7d693f60a85
Reviewed-on: http://gerrit.openafs.org/2241
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Remove the configure flag to specify the location of the Digital
UNIX kernel headers and some setup for the kernel module build.
Note in README that Digital UNIX / Tru64 is supported for servers
only.
Change-Id: I983f74068b1a1ae76d9a2b2549a8a141dba4e075
Reviewed-on: http://gerrit.openafs.org/2207
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Previously, building with Kerberos support required either passing a
flag to configure giving the location of a krb5-config script, or
manually setting variables specifying the Kerberos libraries and
header path. Replace that code with code that checks for Kerberos
libraries automatically and builds the Kerberos code if any were
found, with support for doing direct library probing if there is no
krb5-config script.
Add several platform-specific overrides directly into the configure
support, so we should be able to build out of the box on Mac OS X 10.3,
HP-UX, and AIX Kerberos with the new probes.
The Kerberos Autoconf macros are now the versions that come with
rra-c-util and are tested with multiple other packages, so both
OpenAFS and those packages will be able to benefit from further
portability improvements.
Update README for the new building instructions, documenting how to
configure the Kerberos probes if they can't automatically figure out
the location and flags for Kerberos on your system.
Change-Id: Ia35bb0dbc6b94c6b4dfe8165388447dbfcb31a29
Reviewed-on: http://gerrit.openafs.org/2026
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
on macos systems where we can't get the environment,
just return from ktc_newpag
Change-Id: I9a169d0bf035c40d727a386bb3d2070eea225ed4
Reviewed-on: http://gerrit.openafs.org/2150
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
In 2.6.35, the fsync file operations drops the dentry argument.
Add a configure test and cope.
Change-Id: Iaf660808d52688a4a8fd53a76d8d055602f746b9
Reviewed-on: http://gerrit.openafs.org/2064
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
AC_CHECK_LINUX_STRUCT for the check for ctl_name in ctl_table instead
of AC_CHECK_LINUX_FUNC.
Change-Id: Ia0e0de5d62ce7f702a3f1d7a5cd4d19ef726095c
Reviewed-on: http://gerrit.openafs.org/2057
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
If we are building for are kernel with keyrings, and we can
guarantee that we can make use of those keyrings, then we no longer
need to probe for the syscall table at all. Change our default
behaviour so that when these two conditions are true, syscall probing
is disabled. Both --enable-linux-syscall-probing and
--disable-linux-syscall-probing can be used to override the
autodetection and force things one way or the other.
We have to check that we can use the keyrings because there was a
window in the 2.6 kernel series where keryings were available, but
the key_type_keyring definiton (which we use to create the session
keyring) wasn't exported. In that situation, we attempt to traverse
the process table and use the type of init's session keyring. This
traversal is fragile, and if it fails, keyring PAGs will be disabled.
So, we still want to be able to fall back to patching the syscall
table, if we can, in this case.
FIXES 125215
Change-Id: I11ba5c68fe37609bbd6b9c9f7e7c699334f42ebc
Reviewed-on: http://gerrit.openafs.org/2002
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Use AC_TYPE_SSIZE_T to handle the ssize_t check (introduced in Autconf
2.60). Use AC_CHECK_TYPE, not AC_CHECK_TYPES, to check for sig_atomic_t
and socklen_t, and define them in afsconfig.h if they're not present on
this platform. Do not define them in stds.h, since stds.h is an installed
header file and cannot rely on Autoconf defines.
Change-Id: I80e1a00efc84420002a95d6cafc25ea70befa49d
Reviewed-on: http://gerrit.openafs.org/2018
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The Linux read/write file operations take a position. Use this
position to determine where we're reading or writing in a file,
rather than using the vfs_llseek() operator to set the file
position argument. This avoids a potential race condition, as
well as simplifying this code.
Change-Id: I82b4a109f9871fa2ce5b308bc32923b1bf910920
Reviewed-on: http://gerrit.openafs.org/1993
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Define the PageCheck family of functions using PageFsMisc
equivalents if those are found. I encountered a need for this
on Centos 5.5 (2.6.18-8.el5xen), but it may be more general.
Change-Id: I365a769614fd7514e0c0223bf1854cce09f759f7
Reviewed-on: http://gerrit.openafs.org/1982
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
AC_CACHE_CHECK has been available since Autoconf 2.5 (released in
1995), and provides a simpler mecahnism for performing cached checks
than AC_CACHE_VAL does. Modify all of our simple AC_CACHE_VAL calls
to use AC_CACHE_CHECK.
Change-Id: I490f5e6ae5a3fdc1ada88aba9cd22c89d415a376
Reviewed-on: http://gerrit.openafs.org/1974
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
We haven't even pretended to work on the 4.X series for quite some
time, and keeping this code around just makes things (slightly)
harder to read.
AFS_FBSD_ENV is now equivalent to AFS_FBSD50_ENV (though the
latter should not be used).
Leave the fbsd_4 sysnames in afs_sysnames.h for archival purposes.
Change-Id: Ibebda92967ca26c3dd4bf0b2cc6a66ae3a94d0ff
Reviewed-on: http://gerrit.openafs.org/1968
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Use the standard AC_CHECK_TYPES mechanism to check for the existence
of socklen_t, and to typedef it as an int if it's not found, rather
than growing our own.
Change-Id: Ib5aeb600750558167f63833dd4a7480dbe312b8a
Reviewed-on: http://gerrit.openafs.org/1972
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add the kmem_cache_create test for dtor to the configure to
build again on older versions of linux. Fixes,
osi_vfsops.c:264: error: too few arguments to function
‘kmem_cache_create’
Change-Id: I1c1aa63e8dbe2df6c9b889edaa66708d7db01847
Reviewed-on: http://gerrit.openafs.org/1948
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The sysname for Linux Alpha is alpha_linux_26 (or 24 or 22) with an
extra underscore before the version, unlike all the other Linux sysnames.
Allow for that case when deciding whether to include the common Linux
param header.
Change-Id: Icab3a9214d0bd020b846734cce27da6c1bdeab56
Reviewed-on: http://gerrit.openafs.org/1915
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Prior to autoconf 2.13, AC_CHECK_TYPE took two arguments, the type
to check and the a default type to use if that type wasn't defined.
This usage has been deprecated since 2.13, and the AC_CHECK_TYPE
macro itself now behaves differently. Whilst there is a compatibility
mode, the autoconf documentation discourages its use.
We also have an occurence of a slightly more modern AC_CHECK_TYPE,
where we explicitly #define a default value if one isn't provided.
The autoconf manual also discourages this form, however, in favour
of using AC_CHECK_TYPES, and placing suitable typedefs in an
external header file.
Modify our code so we do things in the recommended way.
Change-Id: Ie28067f2c90e9a3aa25cfde45ef081da2d380ee1
Reviewed-on: http://gerrit.openafs.org/1914
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
When the pattern to detect OpenBSD system types (via MKAFS_OSTYPE) was split
into two separate ones for amd64 and i386 architectures, the pattern for
i386-based systems was not set quite right. As a result, i386-based OpenBSD
systems are no longer detected properly at this stage, resulting in an error
of "cannot find input file: src/libafs/MakefileProto..in" during configure.
This patch corrects the pattern.
Change-Id: I67079af74117fa3cdc765f19944e23223709ae6b
Reviewed-on: http://gerrit.openafs.org/1897
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Rebases the NetBSD client port at OpenBSD, which was originally
based on an original NetBSD client port by John Kohl. The
platforms remain closely connected.
At latest milestone, the port builds as a NetBSD LKM, which was
loadable and can mount /afs (but much work remains past this
point).
Change-Id: I1381a60078794da03a82e7bf6e78127da82d61ee
Change-Id: I8e07e82796f6981c99d22ff50dd5b284aad88a9f
Reviewed-on: http://gerrit.openafs.org/1874
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The AFS sysctl interface was trying to register numeric system
calls whenever the kernel would let it. This is anti-social, as
we've never had sysctl numbers allocated to us. In kernels newer
than 2.6.24, this misbehaviour is detected and punished. In recent
kernels, the binary interface has gone away entirely.
Since 2.6.19, the kernel has supported allocated unnumbered system
calls. These are only available via /proc/sys (and not the using
the legacy, binary, API), but they're really the only interface
available to us.
Change the sysctl registration code to use unnumbered calls whenever
they are available. Unnumbered calls aren't available in 2.4.x, so
completely remove that code there.
Change-Id: I882117ca2250894f479292026fed84ff0b5e7972
Reviewed-on: http://gerrit.openafs.org/1871
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
As a final change to the Linux autoconf stuff, reorder the list of
tests so that it's more easy to see what's being checked for, and to
prevent multiple copies of the same thing being added.
Change-Id: I84ca132e178b45ac25ebd48e71193bdd84965770
Reviewed-on: http://gerrit.openafs.org/1857
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Before we did inodes properly, we needed to pre-process osi_vfs.h,
in order to merge our inode structure with the Linux one. Ever since
we moved to native inodes, that preprocessing has been disabled, and
we've just copied osi_vfs.hin to osf_vfs.h Skip this pointless step,
permanently rename osi_vfs.hin to osi_vfs.h, and remove the unused
support scripts.
Change-Id: I5e21eccf2242080cd8b994bd1654260bfb531420
Reviewed-on: http://gerrit.openafs.org/1856
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
If something is a #define, then there's no point in doing a test
compile to check for its presence. Instead, just do #if defined(X)
Remove the tests for for_each_process and prev_task.
Change-Id: Id8a9fddf2571cccd5d61982d4662bce2009c8f43
Reviewed-on: http://gerrit.openafs.org/1855
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add AC_CHECK_LINUX_BUILD() to do a standardised Linux build, which
takes a "checking" message, the autoconf variable to use to cache
the results, headers and code to run, preprocessor variable to
define, and a description of that variable.
Reimplement all of our existing check macros in terms of this one,
resolving many typos along the way.
Change-Id: I41988c83fcdbfbf8152f6dd0e7c4bd16c7a04240
Reviewed-on: http://gerrit.openafs.org/1854
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add a new autoconf macro for doing structure element checks, and
modify all simple structure checks to use it. This introduces a
standard name form - STRUCT_structure_HAS_element, so there are
some changes in the code to make use of this standard form.
Change-Id: Ife967322503ae6f428e76845000de04f26929e65
Reviewed-on: http://gerrit.openafs.org/1853
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
We spend a lot of time in autoconf checking to see if kernel
functions are available. Rather than copying and pasting the same
code everytime we do so, create a macro to do function tests, and
use that macro. This results in standardised naming, so change all
of the places that use autoconf results to use the same standardised
names.
Change-Id: I36212e6c28c4b8455f859da1bbf3e456a2aabc07
Reviewed-on: http://gerrit.openafs.org/1849
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Linux now provides try_to_freeze(), which can be used to replace
all of our refrigerator code. This has been in the tree for a long
time, and actually predates many of the changes we've been modifying
our code to work with. So, use try_to_freeze wherever we can, and keep
a simpler compatibility function for kernels which are too old to have
it.
Change-Id: Iec50f83382f46d2b17b43da815a75755ea916bc6
Reviewed-on: http://gerrit.openafs.org/1845
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Provide an autoconf macro to perform tests for the existence of
Linux kernel header files. Use this to standardise the naming of
header file presence #defines, and to simplify the linux tests.
Change-Id: I49629679db56c5f9a39487bd78fc2e59d5da0269
Reviewed-on: http://gerrit.openafs.org/1844
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Linux has various network helper functions available, which are
guaranteed to do the right thing in terms of setting address space
limits, not dereferencing NULL pointers, and the like. Use these, where
they're available, rather than rolling our own.
kernel_sendmsg and kernel_recvmsg appeared in 2.6.8.
Change-Id: I1cd91afd2182ad936756bbc4cf692262499c16e4
Reviewed-on: http://gerrit.openafs.org/1822
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
llseek is a little more complex than just setting the pos field of
the file structure.
Where vfs_llseek is available to us (it has been since 2.6.8) use that
directly. If vfs_llseek isn't available, then use either the
filesystem's llseek method, or default_llseek (available since 2.6.0),
to ensure we get the proper locking.
Change-Id: I26bcbff984c7164be1724eee7a46cbe6e02bc510
Reviewed-on: http://gerrit.openafs.org/1816
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This adds afsd.fuse, which allows for mounting AFS via FUSE (via
libuafs), instead of via the OpenAFS kernel module.
Change-Id: Iaafe4a5f3034fed943e2e73f79ac95580946f9a8
Reviewed-on: http://gerrit.openafs.org/1725
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Use the AFS_CACHE_VNODE_PATH cache mechanism for UKERNEL, to be
compatible with new kernel caching code, and simplify the cache code a
little bit.
Change-Id: Ifc44790db08a336cca0032a1d05eedf70d2b24b8
Reviewed-on: http://gerrit.openafs.org/1721
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Instead of defining various symbols like _XOPEN_SOURCE, _BSD_SOURCE, and
the like, just use autoconf's AC_USE_SYSTEM_EXTENSIONS to define all of
the appropriate symbols for us. Deal with some fallout by removing some
of the existing defines.
Change-Id: I1c1968c89cc2dfda1293fd2566dac8e266325a72
Reviewed-on: http://gerrit.openafs.org/1582
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
RHEL4 has a very old 2.6 kernel (2.6.9), which predates the start of
the Linux git tree. When I started using page_offset, I mistakenly assumed
that everything in the initial commit to that tree was available in all
2.6 versions we care about. That isn't the case, sadly.
Secondly, the new readpage code uses zero_user_segments, which has only
been available in the mainline kernel since 2.6.25 (RHEL5 appears to have
a backport)
Implement local wrappers for both of these functions when configure can't
find them in the kernel we're building for.
These functions have been created independently of the Linux tree.
page_offset is a copy of the code we used before we replaced it.
zero_user_segments() is a first-principles implementation
of the function (which zeros a pair of memory ranges within a single page)
FIXES 126678
Change-Id: I622aec4d653567d5234e7a127b981e97468bbe7c
Reviewed-on: http://gerrit.openafs.org/1525
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
don't be willing to wait more than about an rx timeout period for afsdb
retries.
Change-Id: Idca642ff7abe6b9233c7501b0f06fd353567bb04
Reviewed-on: http://gerrit.openafs.org/1407
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
In 2.6.33, <linux/autoconf.h> is moving to <generated/autoconf.h>.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Change-Id: Ib97031728b89cf8e17581f3c425216ae4b5538ec
Reviewed-on: http://gerrit.openafs.org/1351
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
<linux/autoconf.h> is automatically included by kbuild; you aren’t
supposed to include it directly. That breaks in 2.6.33 because
<linux/autoconf.h> is moving to <generated/autoconf.h>.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Change-Id: I56c90dfe90ef72408620793fcd4e927ea3d8f468
Reviewed-on: http://gerrit.openafs.org/1350
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The 'name' element of the backing_dev_info structure is new in
2.6.32 - add yet another configure test, and #ifdef to protect our
setting of it.
Change-Id: I0a3e411e571e05771619381bf621d299482c695b
Reviewed-on: http://gerrit.openafs.org/1341
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
we haven't had a 10.2 machine to build on in quite a while...
might as well pull it, it probably doesn't work anymore
Change-Id: Iad809e83dadb0e7fa8c61b3f37f574a571042fc8
Reviewed-on: http://gerrit.openafs.org/1335
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
reuse the Heimdal method for internationalizing comerr. as a side effect
provide heimdal-compatible com_right.
LICENSE BSD
Change-Id: I6e699125ad3af1d402f14f9462e434c30ad4d1fd
Reviewed-on: http://gerrit.openafs.org/1225
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The second parameter to pam_conv() should be a const pointer on
recent systems. Make it so to eliminate a couple of warnings.
A configure test is added to deal with some systems where pam_conv()
might not be const.
Cast a few assignments to cell_ptr in afs_auth.c and afs_setcred.c
since the argv parameter is const.
Change-Id: I5757310c94a6f26ca7dab656edaa416d16e32e2a
Reviewed-on: http://gerrit.openafs.org/847
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
sadly only recent kernels include uintptr_t. change the cast to use unsigned
long
Change-Id: Ib69f7aa0f2d316c5ea8bdc960b15ee0f89f96250
Reviewed-on: http://gerrit.openafs.org/1059
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove configure tests that are no longer used by the build. Testing
for unused features just slows down the configuration process.
Change-Id: I18e161e8e608a69801c53980e545c3077a7578d7
Reviewed-on: http://gerrit.openafs.org/1033
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Ever since b1edf891d7 was committed,
we've not needed to test to see if the OS provides struct buf - we
can just declare it as a structure without providing a definition
in all circumstances.
Change-Id: I81ebad0dcda91229883f44b657e8113ec832668d
Reviewed-on: http://gerrit.openafs.org/1032
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove the --disable-full-vos-listvol-switch configuration option,
and the corresponding #ifdefs. Full output from vos listvol is now
always enabled.
Change-Id: Ib4900cc0a8532b3db31d13d34fe59946b34e86ed
Reviewed-on: http://gerrit.openafs.org/1031
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Remove the --disable-afsdb option from configure, and the
corresponding AFS_AFSDB_ENV #ifdefs from the code. This means that
the AFSDB code will always be built, but whether it used or not
can still be controlled by runtime options in the cache manager.
Change-Id: I1378c4626568e02345c7c400804747c446078c7e
Reviewed-on: http://gerrit.openafs.org/1030
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Make largefile fileservers the only option. Remove all of the
AFS_LARGEFILE_ENV ifdefs, and tidy up some code as a result of
this change.
Change-Id: I126f7dc5505bbdb28c9337dcd2e81403045707f4
Reviewed-on: http://gerrit.openafs.org/1029
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Remove the #ifdef's around the bos restricted mode code. This makes
restricted mode available as part of the standard build, but a server
will not go into restricted mode unless the relevant command line
options are specified, or bos setrestricted is run.
Document bos_setrestricted and bos_getrestricted, and the new
'-restricted' command line option. Add a note to the man pages of
all of the commands whose behaviour is affected by restricted mode.
Add 'setr' and 'getr' aliases for setrestart and getrestart so that
these documented shortcuts continue to work (otherwise they'd be
ambiguous against setrestricted and getrestricted). Note that
setre, setres, and setrest will not work once this patch is applied.
Change-Id: Ie69d21493ea5f78757f0a3d478de43fdaabd3c31
Reviewed-on: http://gerrit.openafs.org/1028
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
OpenSolaris doesn't have its C compiler in /opt/SUNWspro/bin/cc,
but we still have to be careful to avoid gcc, as that can't
build the kernel module.
As a short term stop gap, add a PATH_PROG test which looks in
both /opt/SUNWspro/bin and /opt/SunStudioExpress/bin for cc.
We probably should look in more places, and in the long run,
we should probably be taking whatever autoconf gives us
(for userspace, at least)
Change-Id: Ie31cf1bf474650a081fc101a2aa40cfa6bd39423
Reviewed-on: http://gerrit.openafs.org/1020
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
In kernel 2.6.33, utsrelease.h has moved to include/generated.
Adapt the configure code to consider that location, and clean
up that section's indentation.
Change-Id: I5061043ff7f46875a39953b11c472693650c7485
Reviewed-on: http://gerrit.openafs.org/1009
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This patch adds a new cache store function for Linux, which uses
splice() and direct access to the page cache, rather than doing
data copies to a temporary buffer between rx and afs. It removes
one copy, and some context switching, from the write codepath.
One side-effect here is that it will delay storebehinds from
returning control to the user. Instead of returning once the first
4k has been successfully transfered, we will wait until a cache
chunk has been transmitted. This is currently unavoidable, as we
can't take the GLOCK within a splice actor.
Change-Id: I5b0284d67febccf099710589908fad18b808332c
Reviewed-on: http://gerrit.openafs.org/903
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The binary sysctl interface will be removed in kernel 2.6.33 and
ctl_name will be dropped from the ctl_table structure.
Make the code that uses ctl_name conditional on a configure test.
Change-Id: Iba0f107f299c6515e4e560d7596e6187bd68e399
Reviewed-on: http://gerrit.openafs.org/904
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Fix this build error:
aklog_main.c:67:21: error: com_err.h: No such file or directory
On some systems this system header is actually "et/com_err.h". Cope
by checking for this at configure time and using that location if
needed.
Change-Id: Iaf4fb4fe157ff8e54aa043785377706eab6fb3d1
Reviewed-on: http://gerrit.openafs.org/836
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Fix the kmem_cache constructor function to match the current
expected prototype, and cleanup related code. This has been wrong
for a while, but since we were just passing extra parameters the
only effect was to generate a warning.
- Add a new configure test to detect the new constructor function
signature
- Define the older versions of the constructor in osi_compat.h,
making them call the current version
- Move a few compatibility #defines to osi_compat.h
Reviewed-on: http://gerrit.openafs.org/657
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Commit db949b7fad was incorrect and
generated warnings on many platforms; we cannot determine the correct
format string for a size_t at compile-time. Instead use the %z length
modifier when we can detect that it is safe to use. Otherwise, fall back
to just %lu on Unix, since it is reasonable to assume
sizeof(size_t) == sizeof(unsigned long) on Unix.
Reviewed-on: http://gerrit.openafs.org/647
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This reverts commit 6133d25397.
This patch breaks builds on RHEL5.3 - revert it until we can come up
with a fix.
Reviewed-on: http://gerrit.openafs.org/640
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Fix the kmem_cache constructor function to match the current
expected prototype, and cleanup related code. This has been wrong
for a while, but since we were just passing extra parameters the
only effect was to generate a warning.
- Add a new configure test to detect the new constructor function
signature
- Define the older versions of the constructor in osi_compat.h,
making them call the current version
- Move a few compatibility #defines to osi_compat.h
- Clean up the call to kmem_cache_create by introducing an inline
afs_kmem_cache_create in osi_compat.h
Reviewed-on: http://gerrit.openafs.org/621
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Adapt to the writeback changes in kernel 2.6.32
- Since we define our own backing_dev, it needs to be registered with
the writeback code and attached to the super_block. Otherwise it
might get ignored when writeback is needed.
- Each backing_dev now gets its own kernel thread. The name of the
thread is based on the registered name - the openafs one will appear
as "flush-afs".
Reviewed-on: http://gerrit.openafs.org/574
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
pagevec_lru_add_file isn't available on all Linux kernels.
Fallback to using pagevec_lru_add where necessary.
Reviewed-on: http://gerrit.openafs.org/558
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
some kernels don't have e.g. uintptr_t; revert this hunk for now.
also, autoconf as recent as what's in rhel5 has no macros. provide
some.
Reviewed-on: http://gerrit.openafs.org/553
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This patch adds a '--enable-checking' configuration option. When this
option is supplied, and gcc is in use, the compiler will treat any
warnings as errors. This will hopefully help stop new warnings from
creeping into the tree.
In order to still be able to build, all of the currently existing
warnings are accepted (these are documented in README.WARNINGS). With
this set of warning inhibitions, the tree is known to build on 32bit
Leopard - other systems may vary. Warning inhibition may be disabled
by supplying --enable-checking=all - in this case the tree will
definitely not build!
If --enabled-checking is not specified, the existing compilation
behaviour is maintained, so there is no user-visible change.
Gcc 4.2, or later, is required to use the pragma sets contained within
this patch. Again, they are not visible unless --enable-checking is
given.
Reviewed-on: http://gerrit.openafs.org/526
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Use intptr_t and uintptr_t casts to appease the compiler when
values are converted between 32-bit integers and pointers.
This generates many warnings (currently ~170 on linux amd64)
when pointers are 64-bit.
These types are normally defined in stdint.h, and get defined
by autoconf if that's not the case.
In a few places, NULL is simply replaced with 0 where compared
with an integer.
Reviewed-on: http://gerrit.openafs.org/474
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
With kernel 2.6.32 it is now possible for a process to copy its session
keyring to its parent through the use of the KEYCTL_SESSION_TO_PARENT
function of the keyctl syscall.
We can't use this easily from kernel space to cover all calls to
VIOCSETTOK with the setpag flag - we'd need to make a syscall
or have keyctl exported. Instead, a hook is added to ktc_SetToken to
make it honour the AFS_SETTOK_SETPAG flag, which was ineffective with recent
kernels.
This should cover the most common cases (ex: aklog) where this is needed.
The syscall is coded directly to avoid introducing a dependency on the
keyutils library or header files which may not be installed everywhere.
Reviewed-on: http://gerrit.openafs.org/463
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
acinclude.m4 was adding to afsconfig.h some code to define sig_t as the
type of a signal handler. This definition was in terms of RETSIGTYPE,
which is deprecated by Autoconf. It also adds an unnecessary abstraction
for only two places in the AFS source code where it was used. Remove it
and change those two spots to use the standard C declaration of the
function pointer.
Reviewed-on: http://gerrit.openafs.org/335
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove the conditional and Autoconf flag for enabling BosConfig.new
handling and change bosserver to always rename BosConfig.new to BosConfig
on startup if the former exists.
Document BosConfig.new handling in the bosserver and BosConfig man pages.
Tone down the warning about the BosConfig file format changing and warn
that bosserver rewrites BosConfig when shutting down.
Reviewed-on: http://gerrit.openafs.org/211
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add arm*-linux* to the case statement that attempts to automatically
determine the AFS sysname, similar to the other Linux sysname
determination cases.
Reviewed-on: http://gerrit.openafs.org/334
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Include appropriate header files to eliminate some warnings for
implicit function declarations. These are simple cases that don't
generate new warnings because of the prototypes.
Use grp.h if it exists to get setgroups() definition.
Reviewed-on: http://gerrit.openafs.org/233
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Adds support for sysv message queues for fileserver audit logs. This
also organizes the audit log code into various 'interfaces', of which
there are two: the original 'file' interface, and the 'sysvmq' interface
that this adds. The interface is configurable at runtime with the
-audit-interface switch.
FIXES 124674
Reviewed-on: http://gerrit.openafs.org/82
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove hand-crafted equivalents of AC_SEARCH_LIBS for socket, connect,
and gethostbyname functions. The only effective difference between
this code and AC_SEARCH_LIBS was to define the HAVE_* macros for the
functions, which are not used anywhere in the tree.
Remove AC_FUNC_SETVBUF_REVERSED. This call no longer does anything in
current versions of Autoconf since the last system with this problem
was based on SVR2 and became obsolete in 1987. Remove the one place in
the source tree where the results are used.
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/154
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
sections.
The new structure follows the pattern of the NetBSD param files, as
suggested by Derrick. Since the change is retroactive, it seems
reasonable to also make the retroactive change to add the amd64 param
files, back to OpenBSD 3.6. OpenBSD 3.6 added SMP support for x86_64,
so the architecture was a mature subtarget at that point.
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/177
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The subtarget name is amd64_obsd. A sysname is created for the
OpenBSD 4.5 release, since it's current. The sysname id range starting at
4000 is claimed for amd64_obsd, with amd64_obsd45 at 4014, so that prior
releases can be added in the correct order, if needed.
Mention of Jim Rees and CITI in new param file changed to line crediting
them for original work.
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/153
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add AFSDIR_DATA_DIR to dirpath.h, defined to be the location for
installing and finding architecture-independent data files. Add a
corresponding AFSDIR_CLIENT_DATA_DIRPATH macro that retrieves the
possibly-prefixed version of this path. This will be ${datadir}/openafs
with normal UNIX installation paths and /usr/vice/etc for Transarc
paths. Since there is no apparent need for this path on Windows, it
is not defined in Windows builds.
The only intended use for this path for right now is the message
catalog for fstrace.
Reviewed-on: http://gerrit.openafs.org/91
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Make things build on MacOS 10.6 again. Don't break 10.5 build.
Fix an error in the MacOS port which was left from previous head.
Reviewed-on: http://gerrit.openafs.org/96
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Link the PAM modules against libafsauthent_pic and libafsrpc_pic instead
of the large collection of LWP AFS libraries so that they are always
built PIC, even on platforms that don't normally build everything PIC.
This also uses the pthread-aware version of the AFS routines on platforms
that support it, avoiding conflict problems between LWP in PAM modules
and pthread in a calling application.
Build a separate copy of ktc.krb.o in the pam directory for pam_afs.krb
since there is no AFS_KERBEROS_ENV-aware version of libafsauthent.
Enable the PAM module build by default on x86_64-linux now that it's
properly built PIC and can compile.
Stop ignoring build failures in the PAM modules if they're configured to
build. On platforms where they should not be built, they should be
excluded in acinclude.m4.
Reviewed-on: http://gerrit.openafs.org/65
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/venus/test/fulltest.c wants to use getcwd and expects HAVE_GETCWD to
be defined, but we weren't probing for it in configure.
Reviewed-on: http://gerrit.openafs.org/51
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The move to git means that we can no longer populate the RCSID
macro in the way that it was used with CVS. This patch simply
removes the macro from every file, except where it contains
information from upstream (and it's in a comment).
Reviewed-on: http://gerrit.openafs.org/14
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
LICENSE IPL10
FIXES 124681
blkcnt_t doesn't exist on fbsd, macos 10.3, and isn't really the right type.
this is the right type, but also can be missing. test appropriately.
LICENSE IPL10
FIXES 123620
rework previous fh-based cache support. now allows use of
arbitrarily large file handles, and build correctly for UKERNEL.
we now just use this if there's no iget, instead of providing a configure
switch.
because this relies on the somewhat invasive patch from 124184 it is not
currently pulled up to 1.4.x
LICENSE IPL10
FIXES 124507
Fix the old configure test for key_alloc for the task argument - we
can't just rely on the number of arguments anymore. Wish this could be
done without using -Werror.
Add an additional test for the struct cred argument
LICENSE IPL10
FIXES 123604
The code has long contained a backing_dev_info structure, but it
was never attached to anything. Initialize its use properly with
bdi_init, and attach it to i_mapping for every newly filled inode.
bdi_init and bdi_destroy are needed for proper initialization of
some percpu counters, otherwise we get some oopses.
LICENSE MIT
When calling ctime on an afs_int32, always use a wrapper that assigns the
variable to a time_t before passing it in rather than conditionally doing
so on hosts with a large time_t. This eliminates a configure test,
removes a bunch of warnings in vos.c on platforms with 32-bit time_t, and
will make no difference in generated code with any decent compiler.
LICENSE IPL10
Use AS_HELP_STRING for every AC_ARG_WITH invokation and add proper quoting
to all of them. Based heavily on a patch by Simon Wilkinson, but with
less indentation and more quoting.
LICENSE IPL10
Add --with-linux-kernel-packaging configure flag which disables building
multiple kernels for different MP flavors, sets the kernel module name to
openafs.ko with no version, and installs the modules into the standard
Linux location.
LICENSE IPL10
FIXES 105109
exportfs - NFS translator:
- The exportfs code is updated for the new export ops. The changes are made
conditional on a new configure test that detects the new ops. fh_to_dentry()
basically replaces decode_fh and uses our own get_dentry function instead of the
now defunct find_exported_dentry.
- A check for fh_len=4 is removed - in testing this value is always 6, possibly
because of changes in the kernel code.
- The check for authtab in osi_nfssrv.c assumes that an undefined weak symbol is
0. On my system, an unresolved weak symbol in a loaded module gets the value
0xfffffffe (-2 or -ENOENT) - again, probably a change on the kernel side. Check
that the pointer is not an error constant using IS_ERR().
- In osi_vfsops.c, only use the export_ops bits if building the translator
afspag: the problem here was dealing with unresolved symbols
- afs_showflags is redefined in afs_pag_call.c so it's available for the afspag
module
- A new source file afs_warn.c gets the afs_warn* functions from afs_util.c.
This allows the afspag module to get the afs_warnuser function without dragging
in too many symbols. The new file is attached separately.
other:
- d_path() now takes a struct path argument - includes a new configure test
- osi_vfsmnt -> osi_vfsmount in osi_misc.c Looked like a typo?
- reorder the remove_proc_entry() calls - we need to remove the children before
the parent (introduced with my earlier patch)
LICENSE IPL10
FIXES 93871
if we can't use hlist_unhashed (which is dumb) or we don't have it (less dumb) work around it.
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
LICENSE IPL10
FIXES 93871
if we can't use hlist_unhashed (which is dumb) or we don't have it (less dumb) w
ork around it.
LICENSE IPL10
adapted from marc dionne's patch, but works more directly like the darwin port,
further, i'm guessing iget_locked will go away evewntually. maybe this is
too conservative?
LICENSE IPL10
FIXES 80463
Include linux/key-type.h in osi_groups.c, if it exists. Fix
do_sync_read test for recent kbuild (maybe break it for [some older 2.6]).
To prevent stripping, specify the '--disable-strip-binaries' option on
the ./configure command line. fileserver and volserver are never stripped.
When --enable-debug is specified, binaries will not be stripped by default.
FIXES 61767
1 - task_struct loses thread_info, which is now accessible through the
task_thread_info() macro. A configure test is added to deal with this.
2 - the SLAB_CTOR_VERIFY flag is gone
Background: OpenAFS is vulnerable to crashing in the linux kernel symlink
code when running on kernel versions between 2.6.10 to 2.6.12. This also
includes all RHEL4 kernels, because RHEL4 includes the code from 2.6.10. The
problem is that the symlink text caching API, page_follow_link() et al, is
unsuitable for network filesystems where the page cache may be invalidated
in parallel with a path lookup.
This crash can be triggered easily by doing a bunch of path lookups
involving symlinks (e.g., stat() on various files pointed to through links),
while simultaneously running 'fs flushvol' on the volume containing the
symlinks.
The simplest way to fix this problem is to disable the use of symlink text
caching when the kernel does not provide a usable symlink API.
FIXES 40604
Test whether Linux kernel builds work at all before going into specific
builds so that we can fail earlier with a better error message. Try to
put more errors from the kernel build into config.log.
Rather than setting AFS_PARAM_COMMON as part of the sysname guessing code,
guess the sysname first and then sent AFS_PARAM_COMMON in a separate case
statement based on the results. Otherwise, it isn't set when
--with-afs-sysname is used explicitly, resulting in a broken Linux build.
Add a shared libkopenafs that provides k_hasafs, k_setpag, k_unlog, and
k_pioctl (in other words, enough for a PAM session module that calls an
external aklog).
FIXES 27590
add missing variable test
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
FIXES 27589
update for new mutexes
new (2.6.16) kernerls have i_mutex instead of i_sem
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
make i_sem become i_mutex
FIXES 18349
add a volume update counter. danger will robinson. see ticket for details.
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
add configure gunk
====================
add configure gunk
====================
make this happy in libadmin on e.g. solaris
====================
make this work on Windows
incorporating STABLE14-macos104-20051005 STABLE14-macos-cleanup-20051006 macos-cleanup-20051006 macos-cleanup-20051007 from the 1.4.x branch, which needed to be forward-ported to work here, sadly.
i slipped a rollback on the linux 2.4 dentry stuff for osi_UFS* in here
at the same time. this patch lets us use kernel inodes instead of our own pool.
provide daemon() if none exists. call it in bosserver and in afsd for afsdb handler
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
add the file, too