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.