Per http://www.openafs.org/pages/no-more-des.html the kaserver
suite of utilities is deprecated and is not supposed to be built
anymore in this post-1.6 world.
Not building them at all requires some effort, but not installing
them is pretty easy. Do the easy part for now, and leave the hard
parts for a follow-up commit.
Change-Id: I1c400a7398b8708e7c9dc6613cd183b9b67e7a7f
Reviewed-on: http://gerrit.openafs.org/8457
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
The defaults for LINUX_KERNEL_PATH and LINUX_KERNEL_BUILD in
acinclude.m4 were changed in 2cfd611, 94ff565 and 3f9d982 without updating
the output of ./configure --help. Change the description of
linux-kernel-headers and linux-kernel-build to show the correct defaults.
Change-Id: I41331f4d48a555e291a45ca56e788bc418c064d3
Reviewed-on: http://gerrit.openafs.org/8759
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
As of kernel 3.7, version.h has moved, and hence utsrelease.h was
no longer found. Loop over candidate directories and locations
within, and look for the files we're actually after.
FIXES 131525
Change-Id: I686212a283b9e0ce769b1351e3cb75e08f4b110c
Reviewed-on: http://gerrit.openafs.org/8761
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Adapt to the new parameters for the instantiate key operation.
Change-Id: I25dea3489b68cad662e962a4973ee98ec7228cd3
Reviewed-on: http://gerrit.openafs.org/8470
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Replace the existing test with a more robust one that checks for
the existence of the new filename structure. Since older kernels
are expected to fail this test, we'll get the correct result even
if there is unrelated failure, for instance a missing/different
header file.
Change-Id: Ie50abce37580eab803e9b07e636a1538f4a91a81
Reviewed-on: http://gerrit.openafs.org/8466
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
if we have code which uses HAVE_POLL, check for poll().
Change-Id: I1baf61541b243f82b3acca112db2cbbca813182b
Reviewed-on: http://gerrit.openafs.org/8357
Reviewed-by: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
RX mutexes have two mechanisms for asserting ownership of a mutex:
MUTEX_ISMINE, which returns true if the caller is the owner of the
mutex in question, and osirx_AssertMutex which fires an assertion if
the calling thread doesn't own a specified mutex.
Neither of these work with pthread mutexes on all platforms, and the
kernel support for MUTEX_ISMINE is dubious in places. Because in some
implementations, MUTEX_ISMINE tries to lock the mutex in question, a
failing call to MUTEX_ISMINE can lead to the process holding an
additional, unexpected, lock.
This patch reworks all of this, and uses the new opr mutex framework
so that we can do mutex assertions in userspace, too. We remove the
unsafe MUTEX_ISMINE macro, and replace it with MUTEX_ASSERT which
simply asserts if the specified mutex is not held by the current
thread. osirx_AssertMutex is removed as it is now redundant.
MUTEX_ASSERT will always work in kernel code.
For userspace, we provide opr_mutex_assert, which is implemented using
POSIX error checking mutexes. As error checking mutexes have a runtime
overhead, this is only available when configured with
--enable-debug-locks, the rest of the time calls to opr_mutex_assert are
no-ops.
Change-Id: I285ee2b558389fa3d63b786e4bc4420fa2126c80
Reviewed-on: http://gerrit.openafs.org/8282
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
putname is unexported in kernel 3.7. Add a compatibility inline
afs_putname function and open code it if necessary.
Change-Id: I5416067566f6332d77e5d91ce2b9cf7bc0c96dce
Reviewed-on: http://gerrit.openafs.org/8237
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
provide a way to run native rxgen, config and compile_et
Change-Id: I9d1a2b4a1d4100fdc4a042005586e8fc40f39f7b
Reviewed-on: http://gerrit.openafs.org/8199
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Do not assume that there is only a single character before the dot.
Change-Id: I45169a6faa5dbeafc4f9c57deaaad96bef8de613
Reviewed-on: http://gerrit.openafs.org/8106
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
In kernels before 027445c3, the functions generic_file_aio_read and
generic_file_aio_write, as well as the fs operations aio_read and
aio_write, do not deal with iovecs but rather just use a single
buffer. Detect this, so our aio_read and aio_write implementations
have the correct signatures.
This removes several warnings on such kernels.
Change-Id: I70aa0d43bac5545d83710806b58f36d13d7f6cc8
Reviewed-on: http://gerrit.openafs.org/8020
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Some revisions of the kernel from RHEL5 (2.6.18-308.* and possibly
others) renamed 'struct path' to 'struct vfs_path'. So, use
'struct vfs_path' when it exists.
This introduces the afs_linux_path_t typedef, which is defined as
either a struct path, or struct vfs_path.
Change-Id: I88c31125dbc1ab2998a521e3c57ed532bf2d5bb7
Reviewed-on: http://gerrit.openafs.org/8019
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
The nameidata argument is replaced with an unsigned int flags
argument.
Change-Id: Ife07bb50ae7d747bd6256ea8238c4e19dbb5ee3f
Reviewed-on: http://gerrit.openafs.org/7987
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
The nameidata argument is dropped, replaced by an unsigned flags
value. The configure test is very specific; kernels with the
older API with a signed int flags value should fall through.
Change-Id: I5939b089b023fe81e3824ac3f920c4b6a261d39a
Reviewed-on: http://gerrit.openafs.org/7986
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
The nameidata argument is dropped and a flag is added.
Change-Id: I33692fc506e7eb9b8935a27ff3d10b713dfa6e5e
Reviewed-on: http://gerrit.openafs.org/7985
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
The d_alias pointer is now the head of an hlist. This means the
iterator is a different macro and has no "reverse" version since
hlists have no direct pointer to the list tail.
inode->i_dentry gets the same treatment. Adjust where we use it.
Change-Id: Ibcdd8ab6f8a571a8f94c646949ebe0503f075574
Reviewed-on: http://gerrit.openafs.org/7983
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
dentry_open now takes a path argument that combines the dentry and
the vfsmount pointers.
Add a configure test and a new compat inline function to keep things
cleaner in the main source file.
Change-Id: Ia29422d60d438cf4c795840566d4610649aa1f10
Reviewed-on: http://gerrit.openafs.org/7982
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
kmap_atomic no longer requires a KM_TYPE argument. Test for this
and adjust the affected code.
Change-Id: I3a9e0018124d40be51cc509ac00d9250a5e8e76d
Reviewed-on: http://gerrit.openafs.org/7981
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Add a set of functions to the opr library to handle creating and
manipulating UUIDs.
The opr_uuid_t type is held as a 16 octet character string, which
comprises the UUID encoded into network byte order. This is the
primary form for manipulating UUIDs with this library, as it avoids
any nbo/hbo problems.
For applications which require raw access to the UUID components,
the opr_uuid_unpacked structure is provided, and
opr_uuid_pack/opr_uuid_unpack can be used to convert to and from
this format.
Finally, functions to print the UUID as a string, and parse a UUID
from a string, are provided. When printing, we use the standard UUID
format of 000000-0000-0000-0000-00000000. However, the afsUUID library
used to print UUIDs as 000000-0000-0000-00-00-00000000, so we also
accept this format.
Change-Id: I78ef79b7ab8ae15fb955c6495118722875c94f8d
Reviewed-on: http://gerrit.openafs.org/7977
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Use the kthread_run interface on linux to create kernel
threads. This interface allows all the cpus to schedule
afsd threads, instead of just inheriting the cpu affinity of
the main afsd thread.
Written by Tom Keiser.
Change-Id: I69eb852d168bd85e9aa7ec075013c0346207dbcf
Reviewed-on: http://gerrit.openafs.org/7915
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Currently we have the ADAPT_PMTU define, which turns on functionality
in Linux to detect PMTU-related ICMP errors for Rx. However, this is
really turning on two separate pieces of functionality: the PMTU
processing, and the processing for ICMP errors in general.
So split this out into two defines: AFS_ADAPT_PMTU, and
AFS_RXERRQ_ENV. The former is for processing PMTU discovery, and the
latter is for processing ICMP errors. Both of these are left disabled
due to issues in the error processing. Although PMTU discovery is the
only functionality which makes use of ICMP errors, this will change in
the future.
Change-Id: Ia334c68ce5eb3fa01c01a8a1c52a0e0a2e41b2c0
Reviewed-on: http://gerrit.openafs.org/7925
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Currently, we try to invalidate other dentries that exist for a
particular dir inode when we look up a dentry. This is so we try to
avoid duplicate dentries for a directory, which Linux does not like
(you cannot have hardlinks to a dir).
If we cannot invalidate the other aliases (because they are being
used), right now we just return the alias. This can make it very easy
to panic the client, due to the sanity checks Linux performs when dong
things like 'rmdir'. If we do something like this:
mkdir dir1
fs mkm dir1/mtpt vol
mkdir dir1/mtpt/dir2
fs mkm dir1/mtpt/dir2/mtpt2 vol
cd dir1/mtpt
rmdir dir2/mtpt2
For the 'rmdir', we will lookup 'mtpt2'. Since 'mtpt' and 'mtpt2'
are mountpoints for the same volume, their dentries point to the same
directory inode. So when we lookup 'mtpt2', we will try to invalidate
the other dentry, but we cannot do that since it is the cwd. So we
return the alias dentry (for 'mtpt'). The Linux VFS layer then does a
sanity check for the rmdir operation, checking that the child dentry's
parent inode is the same as the inode we're performing the rmdir for.
Since the dentry we returned was for 'mtpt', whose parent is 'dir1',
and the actual dir we're performing the rmdir for is 'dir2', this
sanity check fails and we BUG.
To avoid this, make the dentry alias act like a symlink when we
encounter an uninvalidateable dentry alias. That is, we allow multiple
dentry aliases for a directory, however, when the dentry aliases are
actually used, we redirect to a common dentry (via d_automount where
possible, and follow_link elsewhere).
This means that such mountpoints will behave similarly to symlinks, in
that we 'point' to a specific mountpoint dentry. This means that if we
have multiple different ways to get to the same volume, and all are
accessed at the same time, all but one of those mountpoints will
behave like symlinks, pointing to the same mountpoint. So, the '..'
entries for each path will all point to the parent dir of one
mountpoint, meaning that the '..' entry will be "wrong", but for most
cases it will still be correct.
In order to try to make the 'target', pointed-to directory consistent,
we add a new field to struct vcache: target_link. This points to the
dentry we should redirect to, whenever that vcache is referenced. To
avoid (possibly not-feasibly-solvable) problems with refcounting, this
pointer is not actually a reference to the target dentry, but just
serves as a pointer to compare to.
FIXES 130273
Change-Id: I990131ce95cefe8336e83c7ebfb48aed1d685109
Reviewed-on: http://gerrit.openafs.org/7741
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
provide an option to disable building uss. current heimdal
when built static can leak symbol names for its flex/bison parser
causing symbol conflicts. this is but a workaround, but
sites not needing uss can at least use it.
Change-Id: Ibab1dd189e7fbc41ca01e7ef7479421c056999f5
Reviewed-on: http://gerrit.openafs.org/7553
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
The encode_fh export operation now expects two inode arguments
instead of a dentry and a "connectable" flag. Use the inode of
the dentry we're interested in, and NULL as the parent inode which
is the same as passing a 0 flag in the previous API.
Change-Id: I05cf146fb2a4bacdca20a9f108d04ccb11530804
Reviewed-on: http://gerrit.openafs.org/7523
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
end_writeback() is renamed to clear_inode(). Add a configure test
and cope.
Change-Id: Icaf5b6b54d0ee377fabcf0b295d690eaa6b4be5e
Reviewed-on: http://gerrit.openafs.org/7503
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Add checks for recent versions of sunstudio for solaris. The
installation paths are documented in the release notes of versions
12.1, 12.2, and 12.3.
Change-Id: Ic28f40a061f288a1c39acb6a5d11e81876631d7f
Reviewed-on: http://gerrit.openafs.org/7253
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Add setprogname to the list of functions that we test for, and replace
with a libroken alternative if it is missing.
Remove setprogname and getprogname from the AC_CHECK_FUNCS list, as
AC_REPLACE_FUNCS is a superset of this test.
Change-Id: If81dc8ba6d9245329f3abae6a6f062e3827dcfab
Reviewed-on: http://gerrit.openafs.org/7250
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Add krb.conf and krb.excl support to the auth cell configuration
library. Provide a function to determine if the user is local to the
cell. Provide a function to set the local realms during application
initialization. These changes are intended to replace the functions
afs_krb_get_lrealm and afs_is_foreign_ticket_name.
Change-Id: Iba57e9ffc2c958f3a4565a9352ce172189276ce9
Reviewed-on: http://gerrit.openafs.org/5744
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Fail configure if the solariscc is not found and give the builder
a message to cope with non-standard installation paths for
sunstudio.
Change-Id: I64c1e752833f2aa824f4a15cc144e54bb03a1ec8
Reviewed-on: http://gerrit.openafs.org/7204
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Also, fix afsxbsa.h to always include <time.h> since this should get
struct tm on any fairly modern operating system.
Change-Id: Idfb39f12d28a2a0aa470c8549e4149d0b2ccde9e
Change-Id: Ia1c563e5954c533f18bd56155f2ae1825813efe3
Reviewed-on: http://gerrit.openafs.org/6923
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
If d_make_root is available, use it instead of d_alloc_root.
The helper was introduced in 3.3, and d_alloc_root gets removed
in 3.4.
Change-Id: I39aaa6fd14d04c05ad9cb5b610e7f12f70fe0c94
Reviewed-on: http://gerrit.openafs.org/6931
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
With newer Solaris Studio (sometime in the 12.* series), cc started
adding SSE instructions to optimized x86 code, which is invalid for
kernel code and can generate panics. There appears to be no way to
turn this off currently (-xvector=%none is non-functional), so default
to not optimizing kernel code.
Change-Id: I5fdedb11219df68e0146b8e0cee9010c2eb4067e
Reviewed-on: http://gerrit.openafs.org/6671
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Commit 267934d0e6 introduced
probing code to deal with the renameing of simple_fsync
inside the linux-kernel.
This test does not take different parameter-lists
for noop_fsync or simple_fsync resp. into account.
Fix this.
Change-Id: Ib490f0bb7e8098acc83fce001a43c08f478ad582
Reviewed-on: http://gerrit.openafs.org/6628
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
The mkdir and create inode operations have switched to using
umode_t instead of int for the file mode.
Change-Id: Ib8bbf6eaa6e87d6a9692c45b1a3fe93fcc3eff7a
Reviewed-on: http://gerrit.openafs.org/6567
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
A generic macro exists to test for functions in the kernel, use
it for set_nlink.
Change-Id: Iaec2b29e48f500bcf7a1ef80a3f2a1305e5dbb8f
Reviewed-on: http://gerrit.openafs.org/6566
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Directory writes are synchronous, so this is fine. There's a
mostly-convenient function in fs/libfs.c that returns 0 that we can use
to do what we want ("mostly" because it was renamed in 2.6.35).
FIXES 130425
Change-Id: I9a2af60ed3152be036f0145c94152d8cff2e1242
Reviewed-on: http://gerrit.openafs.org/6491
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
As of v3.2-rc1~84^2~1, struct inode.i_nlink is now const to prevent
direct modification.
Change-Id: If0a38ffb7f9964e23f5e64c900ae92f56fb77def
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/6096
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Add the replacement setenv and unsetenv functions to roken, for use on
(at least) HP-UX and older Solaris.
Change-Id: Id05137b6e6c88eb6648bd6a6e649f9ef311e32a4
Reviewed-on: http://gerrit.openafs.org/5801
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
OPENAFS_OSCONF can set the C compiler we use, as well as changing
various compiler flags. These changes can alter autoconf tests, so
allow OPENAFS_OSCONF to change these before various autoconf tests are
performed which require the C compiler.
Change-Id: I8da7d10b227f230d1467c77845c0dbd4b48fa966
Reviewed-on: http://gerrit.openafs.org/5785
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
we already have this data; if we can output it, do so.
Change-Id: Ibc445a152e4e1e61be50003dd8683d2a4b32d190
Reviewed-on: http://gerrit.openafs.org/5510
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Certain platforms (like ppc64_linux26) compiler options might
affect some autoconf tests. In particular, the ones related to
the size of certain primitive types.
Change-Id: I20c3f737ee4623451bc6cab3f97e86d152cb397f
Reviewed-on: http://gerrit.openafs.org/5366
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
The d_delete dentry operation now takes a const argument. Test for
this and define our function accordingly to avoid warnings.
Change-Id: I621f54d8e8182b29ccfdf82798773800f5870064
Reviewed-on: http://gerrit.openafs.org/5335
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
The fsync file operation gets new arguments to specify a range.
Add a configure test to check for the API change.
The inode lock is also pushed down into the operation, so we need
to take it ourselves to keep the original behaviour.
Change-Id: Icf4e152ce52f2b32c99920f83a5cc3136c05d2cd
Reviewed-on: http://gerrit.openafs.org/5332
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Check for kindlegen in configure and do nothing in the MOBI build
rule if the binary didn't exist.
This is still a bit of a hack since the rule will run with every
invocation of make. The target needs to be made conditional. But
at least this way make all in the documentation directory doesn't
fail.
Change-Id: I57f158929b3907678b9848a60edb9765136f7dbb
Reviewed-on: http://gerrit.openafs.org/5090
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
docbook2pdf, at least in version 0.6.14-1.1 in Debian, dies while
attempting to build the Admin Guide with an error about TeX capacity
exceeded. dblatex seems to work reliably. If both are installed,
prefer dblatex to docbook2pdf.
Change-Id: I7cf594c677cde84410bfefacf07cbbf398026ff3
Reviewed-on: http://gerrit.openafs.org/5091
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Russ Allbery <rra@stanford.edu>
<netinet/in.h> is a prerequisite for <resolv.h> and <netinet/if_ether.h>.
<sys/socket.h> is a prerequisite for <net/if.h>.
Change-Id: I2c974ad863c6ff7eedb3702159399118af8de074
Reviewed-on: http://gerrit.openafs.org/5107
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Equality in the test(1) utility is represented by "=", not "==".
Some, but not all, versions of test accept the latter as an extension.
Change-Id: I25380f77e1c621965e0610318c9793874154cf15
Reviewed-on: http://gerrit.openafs.org/5106
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
A previous change added support for setting thread names/titles to
viced; this change moves the #ifdef spaghetti to src/util in
preparation for calling it from other places where it would be
useful. Two functions are defined, one for setting an arbitrary
thread's name (as might be done by the spawning thread) and one
for setting the current thread's name; the latter is also defined as
a macro for non-pthreads compilations so that it can be called
unconditionally (the interface does not reference any
pthread-specific data types). Note that some platforms, Mac OS X
in particular, do not allow setting the name of a different thread.
The two functions are defined as no-ops for Windows as our pthreads
emulation layer for Windows does not provide the needed mechanism.
Make viced use the new interface.
Change-Id: I58c65a28772d8d188c03d6ff3a6f052889362fb7
Reviewed-on: http://gerrit.openafs.org/4966
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Some pthread libraries support setting a name or title for individual
threads (analogous to setproctitle() for processes). This can be useful
for debugging and is sometimes published for use by utilities like ps
(again like setproctitle() for processes). The two most common variants
of this have the same signature with slightly different function names.
If either one is present, use it in viced (which already assigns a thread
name when compiled for LWP but ignores it in pthreads compilations).
Change-Id: I5486aa6a21dbc3c8885b94ad52c2b1a66baae81f
Reviewed-on: http://gerrit.openafs.org/4950
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Linux 3.0 is just a rebranded Linux 2.6.40, so we can use the same
sysname and the same code.
Change-Id: I154334dc5b73980a0d9b8abd9fd6645994f63829
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/4843
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Remove support for all Solaris and SunOS platforms prior to Solaris 8,
since Solaris 7 reached end-of-life in August of 2008. Remove all
non-documentation references to sunx86_57 and earlier, sun4x_57 and
earlier, and AFS_SUN57_ENV and earlier.
References to AFS_SUN58_ENV have been changed to AFS_SUN5_ENV where
appropriate, and AFS_SUN5_ENV now implies Solaris 8.
AFS_SUN57_64BIT_ENV has been renamed to AFS_SUN5_64BIT_ENV.
Change-Id: Ia64ce7da7bfc685fa28a5119c51ec740625456e3
Reviewed-on: http://gerrit.openafs.org/4888
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
It would seem xsltproc -> fop -> pdf is the "modern" way to generate
pdf from docbook now. The hard part is finding the stylesheets.
This should work for fedora, sles and debian. Additionally, it brings
some consistency--xsltproc for all the conversions. You can still
override via configure options if you prefer something else.
Change-Id: Id779e9473a6759daddc9a61be714109b27da980e
Reviewed-on: http://gerrit.openafs.org/4821
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
configure should attempt to find the XML tools we need to process
the documentation. if it can't, it should provide a safe default.
still allow the user to override via command line.
Change-Id: Ifaf3a5b090e93858c3d3c88363760c508030db90
Change-Id: Ib9558c37b04a4533e91b172a2a62039e4ed06d6f
Reviewed-on: http://gerrit.openafs.org/4766
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
With linux 2.6.8 the struct read_descriptor_t changed.
Add a configure-test and respective ifdef to deal with that.
Change-Id: Iff1a6252707cd2119bdc0382c641934119ea0422
Reviewed-on: http://gerrit.openafs.org/4719
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This includes the following fixes:
* Include krb5.h before probing for the IBM-specific header file for
obtaining error strings to avoid Autoconf warnings on AIX.
* Use [] to mark empty arguments to Autoconf macros.
* Add an explicit license statement to these Autoconf macros, matching
the normal Autoconf macro license.
* Ensure rra_use_kerberos is always set so that other parts of configure
can rely on it.
Change-Id: I521d38ad6834808cf09c798aeba0efc0dd741fd6
Reviewed-on: http://gerrit.openafs.org/4588
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
try to optimize out things which will be missing
Change-Id: Ibee45ae75fa0a5cbdad9eb7a83b12cfaba85b201
Reviewed-on: http://gerrit.openafs.org/4569
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
On Darwin, net/if.h is only usable if sys/socket.h is included first.
Do so, to stop autoconf from warning about this test.
Change-Id: I9e7a2642cce86c5ad6ebb3ae3cb60401dd9c26cf
Reviewed-on: http://gerrit.openafs.org/4535
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
On at least Solaris, the configure tests for netinet/if_ether.h and
security/pam_modules.h issued warnings because they existed but were
not compilable. Perform the tests with the prerequisite headers of
net/if.h and security/pam_appl.h, respectively, so autoconf will stop
yelling at us.
Change-Id: I05d637784954c10af468b6065acd78139fc45245
Reviewed-on: http://gerrit.openafs.org/4467
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
roken now has tsearch for windows. add it.
Change-Id: I73f609d6285f52bb2b52f580b95ca4510204efa1
Reviewed-on: http://gerrit.openafs.org/4451
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Use the gettimeofday implementation from roken, rather than brewing
our own on Windows.
Change-Id: I02fc1a7f0f6aded2e16e2ed53e04054546fc0535
Reviewed-on: http://gerrit.openafs.org/4433
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Fix our check for localtime_r so that it actually picks up if it's
missing on Unix platforms, and gets libroken to build it.
Change-Id: Ibf6e3a0272b08aa55e0ee9493f68b3c53a5b6938
Reviewed-on: http://gerrit.openafs.org/4425
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Remove headers which are provided by libroken, and reorder header
includes so that they're a bit a more legible.
Also add a selection of headers to the list that autoconf checks for
Change-Id: Ic76bb02ff5353ceba380b78abc294251ecc66267
Reviewed-on: http://gerrit.openafs.org/4418
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Add the putenv, setenv and unsetenv functions to the list of
functions that configure checks for. This avoids the roken header
redefining them to rk_*, which we're then not providing an
implementation of.
Change-Id: I63bd88326e933f0afed399233c38489cd2aea46b
Reviewed-on: http://gerrit.openafs.org/4406
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Remove headers which are provided by libroken, and reorder header
includes so that they're a bit a more legible.
Change-Id: I4952f8d115d38a3bd1dfe86478cd4a30f533e86f
Reviewed-on: http://gerrit.openafs.org/4386
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Fix a few issues with the recent commit to deal withg the removal
of path_lookup, spotted on RHEL 5:
- the configure tests needs fs.h to be included before namei.h, to
get the definition of struct inode
- we need to avoid the use of struct path unless its needed; on
older kernels the structure doesn't exist
Change-Id: I6251a96a371a50548dcafc70d94e91b52fc2922a
Reviewed-on: http://gerrit.openafs.org/4382
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove headers which are provided by libroken, and reorded header
includes so that they're a bit a more legible.
Add math.h to the list of headers that configure will check for
Change-Id: I530afa77866a0aa3a33f8684ce9cf630aa347812
Reviewed-on: http://gerrit.openafs.org/4384
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
This adds arpa/inet.h to the list of headers that configure checks for
Change-Id: I1792ede4be761238bb05567c1d763ed63f50051e
Reviewed-on: http://gerrit.openafs.org/4330
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Add the rk_flock() emulation function to roken, primarily for use
on the AIX build, but it will also be used for WIN32
Change-Id: Ia8f11e19bbe9fdf721a7b72660d860624139d9b1
Reviewed-on: http://gerrit.openafs.org/4368
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Add tests for arpa/nameserv.h and resolv.h, so that roken will look
after including these files for us.
Change-Id: Ifa6b7d877d67c967811017a25c98fab6bd571d4c
Reviewed-on: http://gerrit.openafs.org/4364
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Also, add sys/uio.h to the list of libraries that we check for.
Change-Id: I03d9c143db42a1ec415ab5624e2cbede0d34e310
Reviewed-on: http://gerrit.openafs.org/4318
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Make more use of roken on HP/UX by letting it provide definitions
for random and srandom, and using its implementation of
getdtablesize
Change-Id: I1212c77ea9cc6ef436cfc5c16e893aefbc33d31b
Reviewed-on: http://gerrit.openafs.org/4341
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Also add pwd.h to the list of headers that we check for in configure,
and that roken will include if they are available
Change-Id: I61ab95eeca11127a33bb668dddfc24ec6ce7f8f1
Reviewed-on: http://gerrit.openafs.org/4303
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
In order to support vectored positional I/O, and large files, we
need there to be an implementation of preadv64 and pwritev64. If
this isn't present, then just disable HAVE_PIOV.
Change-Id: I78b1e09f8a836534f49594300b4f58d661eebd46
Reviewed-on: http://gerrit.openafs.org/4153
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The libroken configuration script is supposed to support using a
libroken which is installed out of the OpenAFS tree, but which isn't
in the standard search paths, by using --with-roken=/path/to/base
This didn't previously work. Fix this so that it works correctly,
and also fix a few problems with libafshcrypto, which assumed that
LDFLAGS_roken would always be -L$(TOP_LIBDIR)
Change-Id: I1219692f601a621e6c08ae26516136ed0cc03845
Reviewed-on: http://gerrit.openafs.org/4096
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
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>
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>
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>
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>
In 2.6.38, the super block structure has a new field to hold the
default dentry ops. The vfs will automatically set it for new
dentries in most cases.
Set s_d_op to our set of operations, and omit setting the dentry
ops where the vfs will already do it (and where new locking rules
prohibit it).
Change-Id: I9d738bdd528577d0a7ccd307246b5e935379c84d
Reviewed-on: http://gerrit.openafs.org/3758
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
OpenBSD follows the policy of using a separate common
param file (post 1.4.x). However, when introducing support
for i386 OpenBSD 4.7, this was not done and a single param
config header file was created instead. This patch changes
the param files for OpenBSD 4.7 so that they are
consistent with the other OpenBSD versions by using a
separate common param header file.
Change-Id: I9d828d2447a2d018eeea0fbe9f4c047ac819d209
Reviewed-on: http://gerrit.openafs.org/3725
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Our imported roken.h provides definitions for bswap16 and bswap32,
but configure doesn't check to see if those functions already exist.
On operating systems where they do, and where the header containing
them is included in our build, this results in compilation errors.
Add a configure test for bswap16 and bswap32, which is complicated
by the fact that they may be macros, or static inline functions, so
a simple CHECK_FUNCS won't work.
Change-Id: Iae3411bf4bb22af8cfd770e01026a28e1863e078
Reviewed-on: http://gerrit.openafs.org/3613
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tidy up our list of header includes so it's easier to see what
we're testing for. The list is now one-per-line, in alphabetically
sorted order.
Note that this won't affect our use of the default include set, as
autoconf will already have tested for all of those before it starts
this CHECK_HEADERS run.
Change-Id: Iffc8c3bc7cbd56d87508ebdde38e61f8747d0501
Reviewed-on: http://gerrit.openafs.org/3612
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Use the HP-UX-specific libHcurses instead of libcurses, like we used
to. Otherwise we fail to link some gtx programs.
Change-Id: I7b8a012d5d263c611a144e05466c5435b5ff310a
Reviewed-on: http://gerrit.openafs.org/3583
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add roken's mkstemp to the build on all platforms, either through
configure (Unix) or explicitly (Windows). Change all callers so
that mkstemp is used unconditionally, rather than falling back
to more risky alternatives.
This is based on original change from Russ Allbery submitted as
http://gerrit.openafs.org/2146
Change-Id: Ia1def41e438e6517b3e7cd5790df3c99eddb8ef6
Reviewed-on: http://gerrit.openafs.org/3398
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Presently, the used curses-library are determined by OS.
The leads to a build error when no curses-headers are installed.
Use configure to test if curses.h or ncurses.h is present.
ncurses takes precedence over curses.h.
If neither the curses- nor ncurses-libs are available, do not build
afsmonitor and scout.
A summary at the end of the configure should make this clear to
everyone.
The variable TXLIBS has been renamed to LIB_curses.
Change-Id: I3f661e0b6199be41818dc22149b061e3d599b77f
Reviewed-on: http://gerrit.openafs.org/3345
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add the strsep function (as rk_strsep) to the OpenAFS roken build.
This function is required by Windows, and is now checked for on Unix.
Change-Id: I71d8e11a30c34aaa89d85d1e6e527d594d5734af
Reviewed-on: http://gerrit.openafs.org/3371
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
vsyslog on AIX (added to rokenafs by commit
f21fbf6b9c) requires rk_*printf,
add them to the libroken build.
Change-Id: I243cb89b5715be03920c562559b326786a9e9518
Reviewed-on: http://gerrit.openafs.org/3320
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
in order to make aix happy, build vsyslog if we have it.
Change-Id: I78e7870ed4fef7ee9d41b0ae6096e6c2b1c6cc19
Reviewed-on: http://gerrit.openafs.org/3316
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Use the stdio_ext functions provided by solaris and glibc
instead of directly accessing private stdio FILE structure
members. This is needed for 64-bit solaris builds and is more
portable in general since the FILE structure is meant to be
opaque. Remove the duplicated code in the pthreaded butc
package.
Change-Id: Idbefa88e2563bb117322e818b1300b324fc3626d
Reviewed-on: http://gerrit.openafs.org/3257
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The configure test for 'winsize' existence was using sys/termios.h,
but some platforms (AIX) have termios.h but no sys/termios.h. So, use
termios.h instead where available.
Change-Id: I284b7fa27ceeed84d9e14b62032176846d764bf2
Reviewed-on: http://gerrit.openafs.org/3258
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
With kernel 2.6.37 the new entry point for mounting a filesystem
is the mount() operation instead of get_sb().
Replace afs_get_sb with afs_mount if the new operation is
available, and use mount_nodev instead of get_sb_nodev.
Note that this is not strictly required for 2.6.37 since the old
interfaces are still around, but we might as well switch now.
Change-Id: Icc73a552fd53148bdd7b84e6d3266491488d9ed2
Reviewed-on: http://gerrit.openafs.org/3245
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Include libroken as a library in its own right, so that the whole
of the code can benefit from it. This change purely adds libroken
for the Unix build system. It doesn't replace those pieces of
libroken in hcrypto or util, or enable it for Windows.
There is also the option of using a system-install libroken, if one is
found at configure time.
*) If --with-libroken=yes, or is not supplied than a system library
will be used if suitable. Otherwise, we'll use the internal
libroken
*) If --with-libroken=/path/to/installation then the libroken at
that path will be used. If there is no libroken there, or it
is not suitable, an error will be returned
*) If --with-libroken=internal then the internal libroken is used,
regardless of what is present on the system.
We deliberately do not provide installed headers for the internal
libroken. If other applications wish to make use of libroken, then
they should use the Heimdal one, rather than piggybacking on ours.
Change-Id: Iff01e1e17090404cc8e4783108ae8a8784170918
Reviewed-on: http://gerrit.openafs.org/3191
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The bit of code that allows aklog -setpag to work with recent
linux needed to be moved along with the change from ktc_SetToken
to ktc_SetTokenEx.
While we're in this bit of code, make it depend on the definition
of the syscall in the user space headers instead of relying on a
kernel configure test.
Change-Id: I0e556b514986b5d06daabcff67ecd51b0e4becdd
Reviewed-on: http://gerrit.openafs.org/2976
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
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>