Remove the conditionals in the linux 2.6 tree for GFP_NOFS. This feature
has existed since the beginning of the 2.6 tree. This makes the code
easier to read.
Change-Id: Ib42af012c57912f72effb836743ab8f1ddc30486
Reviewed-on: http://gerrit.openafs.org/1077
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
tidy up the osi_module and osi_misc prototyping, and the error checking
and returns at module load time. side effect: also use the afs3_syscall
prototype for the BSDs.
Change-Id: I373f44f3b5999dc05ba23f09c74149aaf237edcc
Reviewed-on: http://gerrit.openafs.org/1056
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Copy tt->next before TRELE(tt) calls free(tt).
We have a core file from a VTRANS_OBJ_LOCK(tt) assert failure, with tt
pointing into glibc's malloc data structures.
Change-Id: Id52b774520c59c224b58f5d507cc490dafea5ca1
Reviewed-on: http://gerrit.openafs.org/1069
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Thomas L. Kula <tkula@umich.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Dan Hyde <drh@umich.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Since Linux kernel 2.4.0, MS_NOATIME has been a super block flag,
and S_NOATIME has been the corresponding inode flag. Use the
correct flag when we're opening cache files.
FIXES 126084
Change-Id: I69cbcd651584cc86568c51793dd3f6d3e8644709
Reviewed-on: http://gerrit.openafs.org/1070
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
this is a dodge; we should sign with a real certificate and distribute
signed binaries. until we more formally exist, this allows application
firewall to at least cope better with us.
Change-Id: I84d18f72f7b9a42f4eb41f86e2e6dc1ae54f662a
Reviewed-on: http://gerrit.openafs.org/1057
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Partitions with the 'logging' UFS mount option are known to cause
corruption when using the inode fileserver backend. So, if we detect
that we are attempting to attach a 'logging' partition, refuse to attach
it.
Change-Id: I0ee23b9935ac6ffc66e6228fe03d6bbfb5d64574
Reviewed-on: http://gerrit.openafs.org/999
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
When doing writeback, use current credentials if we can't find
stashed credentials in the vcache entry.
This is normally stashed in afs_open, so it's not clear how we
get to that point, but that's not a reason to trigger an oops.
Change-Id: I60937e3f9e360e68ea84205570c05cabb47ef08e
Reviewed-on: http://gerrit.openafs.org/1063
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Revert the logic meant to prevent duplicate entries in the
host address hash table so hosts with multiple addresses can
be stored in the same hash bucket again.
Add a new log message to show when the host cannot be stored
in the hash table because of an address-port pair collision
with a host already in the hash table.
Change-Id: I24bf48b912dcf3062201691b446372d78de9bc14
Reviewed-on: http://gerrit.openafs.org/1046
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Some fixes needed to make supergroups build on 64bit Mac OS 10.5
Change-Id: I1aea100b138a8212010dd9f511377c993589977f
Reviewed-on: http://gerrit.openafs.org/1060
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
In src/afs/afs_volume.c VL_GetAddrsU() returns memory allocated by the
xdr package. In 1.4 there was no method of freeing this safely. On the
head there is using the xdr_free() function.
FIXES 124937
Change-Id: I72b8333e02e0e58dd16d25e9ed258a2551cdef9d
Reviewed-on: http://gerrit.openafs.org/1047
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Track removal of thread id param, which had become redundant.
Change-Id: Ifa8ddce411373a1aee01b577bf7e5a268e644dd7
Reviewed-on: http://gerrit.openafs.org/1055
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The declaration of centry is needed when supergroups are not
enabled. Restore it within the ifdef so that we don't get
an unused variable warning if supergroups are enabled.
Change-Id: I0e7916b7898cdd5c47accb7f185764bbb1f2e94d
Reviewed-on: http://gerrit.openafs.org/1054
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Prototype functions where necessary, remove unused variables, fix
mismatches of data types (char * != void *), initialize variables the
compiler can't tell are initialized, compare integers against 0 and
not NULL, and wrap assignments used as conditions in an explicit
comparison.
This removes all warnings that fail --enable-checking on x86 with
--enable-supergroups. 64-bit will still have warnings.
Change-Id: I5ab6e317a280bea29cb44b97f2805a00e387577f
Reviewed-on: http://gerrit.openafs.org/1050
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Fixes to re-enable build and load of kernel module on FreeBSD's
RELENG_8. Includes the following changes:
Remove cred pointer argument to vop_getattr and vop_setattr.
Restore VSUID and VGUID defines, but move to osi_machdep.h.
Fixup calls to vinvalbuf, create a macro to avoid too many ifdefs.
Revert incorrect definition of gop_lookupname_user. Avoid
uninitialized use of 'code' variable in vop_access, and track
new a_accmode member name. Remove cred pointer in VFS_STATFS.
Avoid including sys/ioctl.h in kernel mode (formerly had no
effect, it's now an error). Avoid using an empty file as an
object file in shlibafsrpc link. Replace suser() calls with calls
to priv_check, using defined OpenAFS privileges (thanks due to
Ben Kaduk).
Change-Id: I96fc29599a797b975630c8fa5b8b84798b3740a6
Reviewed-on: http://gerrit.openafs.org/1023
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
We don't want to do multiple silly renames of the same dcache entry,
so add a check for that occuring, and just return EBUSY if we're
trying to do so.
Change-Id: Ic1cb4061d89bf87926995162f1ac410375bddcb5
Reviewed-on: http://gerrit.openafs.org/1035
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
In order to keep the dcache happy, the Linux client has its own
sillyrename function. Abstract this out from afs_linux_unlink into a
function of its own (afs_linux_sillyrename) so we can make use of it
from other vnodeops.
Change-Id: I298251c400dfc22efb3bacaa72612b28a5409112
Reviewed-on: http://gerrit.openafs.org/1034
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-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>
modify allocations in axscache code to be able to be tracked. at shutdown,
clean up allocations.
Change-Id: I1fbde0fe49cf0cdeea451dac58718a90f1c87e66
Reviewed-on: http://gerrit.openafs.org/1037
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
bosserver currently has code to specifically allow 'bos
salvage'-initiated salvages to run when in restricted mode. This only
specifically tests for running salvager, though, and so fails when 'bos
salvage' is run against a DAFS fileserver and tries to run
'salvageserver -client' instead.
Test for 'salvageserver -client' as well, so we can run 'bos salvage'
for DAFS fileservers in restricted mode.
Change-Id: I27052a440ea8d6347a9d86e4a1f1a7131a277b0b
Reviewed-on: http://gerrit.openafs.org/1048
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-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>
src/rxkad/Makefile copies fcrypt.h and sboxes.h from the domestic
subdirectory, so ignore the copies in the src/rxkad directory.
Change-Id: I263c8f5ea45c3c6b32bc377f6451424477d255a2
Reviewed-on: http://gerrit.openafs.org/1052
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
As the subject says, using #if BLAH gives warnings. Fix them
in osi_ioctl.c
Change-Id: Iee3da68cd29e84bd201a1ee657d3f80ca9b2f5d5
Reviewed-on: http://gerrit.openafs.org/1041
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Fix a syntax error when GET_SB_HAS_STRUCT_VFSMOUNT is
not true so we can build on older versions of linux.
Change-Id: I85aac803f68c3f3729abd32dfcecbc20ccac8ab9
Reviewed-on: http://gerrit.openafs.org/1049
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Now the reasons for having aklog_main.c separate from aklog.c have gone,
rename the file so we've just got aklog.c
Change-Id: I32e34be246a5357be25ab93328d434c396483042
Reviewed-on: http://gerrit.openafs.org/1038
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Historically, aklog was split into aklog.c (which just contained a
wrapper) and aklog_main.c, which did all of the hard work. Now
that we've purged all of the Windows code from aklog_main.c, we
can merge them both into the same file, so do so.
FIXES 20884
Change-Id: Ifdcb33f4eb2b26703c833056882d95f7f0f654b1
Reviewed-on: http://gerrit.openafs.org/1036
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
if a file is already CStatd we just copy out the information without doing
access checks. add an access check.
Change-Id: I94d1dc118189b19759d8e9635988c40f38026cbb
Reviewed-on: http://gerrit.openafs.org/995
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Previously, afsconf_LookupServer could not meaningfully return a cell
name, since a char* was passed in for realCellName, and
afsconf_GetAfsdbInfo was expecting the value of the pointer to change.
Change afsconf_LookupServer to take a char**, and pass realCellName by
reference, so we can get a cell name back.
Change-Id: Ib945fcb4be482ee155cdd1dcd62fe577c002082d
Reviewed-on: http://gerrit.openafs.org/1039
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
ioctl32.h only became available in Linux 2.5.44, so reduce the scope
of the include. It went away again, in Linux 2.6.22. In its short
life, it only ever provided prototypes for registering translation
handlers, and for sys_ioctl.
Only include it where we call those handlers, and when we call them,
to remove compilation errors for Sparc64.
Change-Id: I7816bd8b1e18ead68f7e5078e684d60bf59ac470
Reviewed-on: http://gerrit.openafs.org/1040
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
To set a key, use "asetkey add", not just "asetkey"
FIXES 125430
Change-Id: Ifa381ec95f9253bcc5c7a1d374fbf88408f82f67
Reviewed-on: http://gerrit.openafs.org/1045
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
invalidate_inode_pages is now marked as deprecated in the kernel
headers. Use the equivalent call to invalidate_mapping_pages() which
has been available since Linux 2.5
Change-Id: I58de20e16874bb06991320b26bc6ce63685b8bb4
Reviewed-on: http://gerrit.openafs.org/1042
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
vos dump -verbose sends its logging to stderr, not to stdout (where
it would potentially collide with the dump data itself).
FIXES 124911
Change-Id: I515c50df59d2f376787969df59b6e01e244ecbc7
Reviewed-on: http://gerrit.openafs.org/1044
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
A stray "Printing ex_req" slipped into the last set of rxgen changes.
Remove the unnecessary debugging statement.
Change-Id: I2dda4138d70bf3429122f58bbbae996b84baefac
Reviewed-on: http://gerrit.openafs.org/1043
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Make TOP_INCDIR/des a dependency of the 'prelude' target, not all of the
'dest'-ish targets. Without this, things like 'make tviced' fail since
we never create the TOP_INCDIR/des directory, but 'des' needs to copy
headers into there.
Also, remove the other redundant INCDIR/LIBDIR deps in the 'dest'-y
targets, and put them in 'prelude'.
Change-Id: I1beb1a0c8b93a7bf17af71792ab38590d03c9976
Reviewed-on: http://gerrit.openafs.org/1027
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Same fix as change I413393a7bacbf207332d7f904cf396c79b77b6b5, but for
the cache bypass code.
Change-Id: Ic181e257f7d0e1892bd10bf14d8d5571b4804d63
Reviewed-on: http://gerrit.openafs.org/1000
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Fix some warnings in src/venus/fs.c so we can compile with
--enable-cache-bypass and --enable-checking:
-- Include ctype.h so isdigit gets a prototype
-- Make BypassThresholdCmd have the proper signature
-- Remove the unused 'size' variable
Change-Id: I09afc6c04c990476226d1c2a751e23d3d39085b6
Reviewed-on: http://gerrit.openafs.org/1025
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Recent changes in OpenSolaris have removed the 'lbolt' variable.
However, the ddi_get_lbolt accessor (which has been present since
Solaris 10) can be used to get access to the same value. So, use it.
Change-Id: I7a72bab14b0226fb25adb642f3621512e02ca216
Reviewed-on: http://gerrit.openafs.org/1022
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Solaris doesn't let us directly play with the groups structure
anymore. Instead, there is a crsetgroups accessor which can be
used instead. So, use it.
Change-Id: I4d5b99110318630c8a7744812476e1941c117381
Reviewed-on: http://gerrit.openafs.org/1021
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>
Some operating systems (cough, OpenSolaris, cough) have multiple
versions of aclocal installed, and don't populate the 'aclocal' name.
If 'aclocal' isn't present, then try using 'aclocal-1.10' before we give
up in disgust.
Change-Id: Iad6daf1038942aeee13f38cb0c00c58da621cfd1
Reviewed-on: http://gerrit.openafs.org/1019
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
987816dfa8 introduced a stray 'cred' in
one of the afs_linux_cred_is_current definitions. Remove it so we can
build without STRUCT_TASK_HAS_CRED.
Change-Id: I7ef94c1c3d15a2a744755d8a20ec2b0c92cd5349
Reviewed-on: http://gerrit.openafs.org/1018
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Housekeeping change to consolidate some common definitions.
Create a new common header called afs_consts.h. This allows
us to remove the afscp.c dependency on afs.h (so src/tests
will build again.) Rename the max filename definition in the
update server package to MAXFNSIZE to avoid a name conflict
with MAXSIZE. The global defines will be prefixed with
AFS_ in a second patch.
Change-Id: I2b8d555a244cc92d889618de4eec4a99550d7c7f
Reviewed-on: http://gerrit.openafs.org/855
Reviewed-by: Mickey Lane <mlane@sinenomine.net>
Tested-by: Mickey Lane <mlane@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>