Commit Graph

6606 Commits

Author SHA1 Message Date
Simon Wilkinson
6e65ffbb6c Linux: Rework PAG to group conversions
The change to using a single group for PAGs on Linux led to a load
of special cases throughout the code. This patch moves the OS
dependent parts of this into the LINUX/ platform directory, and
rearranges that file so that there is a clear distinction between
the one and two group sections of the code.

Change-Id: Ib6e6f081519b23494dcf731b4be689c006180c68
Reviewed-on: http://gerrit.openafs.org/1007
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-13 10:03:27 -08:00
Jeffrey Altman
d2ddc3b6cf Windows: remove signed vs unsigned error in smb_Init
Use UINT_PTR instead of INT_PTR.

LICENSE MIT

Change-Id: Id10cd7b7a18688c9eee68e3eac9c20348519fd37
Reviewed-on: http://gerrit.openafs.org/1089
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-01-12 23:07:01 -08:00
Jeffrey Altman
6789f170d6 Windows: Protect buffers in smb_WriteData from simultaneous writes
smb_WriteData does not properly use CM_SCACHESYNC_WRITE to
protect buffers from simultaneous writes.  Instead of simply
testing CM_SCACHESYNC_WRITE at the top of the while loop,
the flag must remain set until the entire write completes.
cm_SyncOp is now called once and cm_SyncOpDone is only called
upon final success or error.

In addition, as 'count' is unsigned, the test for count < 0
is replaced with count != 0.

LICENSE MIT

Change-Id: I82c8dc20e62079b13bf305e906f4744756aa0ac2
Reviewed-on: http://gerrit.openafs.org/1087
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-01-12 23:05:15 -08:00
Jeffrey Altman
513a7e48a2 Windows: fs examine owner and group are signed
Change the owner array to be signed for displaying owner
and group within fs examine output.

LICENSE MIT

Change-Id: I807e3f1b3c07eb26c1782d6b76cd49977467ce33
Reviewed-on: http://gerrit.openafs.org/1017
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-01-12 23:02:39 -08:00
Jeffrey Altman
57aac9734c Windows: do not call cm_SearchCellByDNS if AFS_AFSDB_ENV is not defined
cm_SearchCellByDNS is only available when AFS_AFSDB_ENV is
defined.  Do not call it when it isn't.

LICENSE MIT

Change-Id: I203ab775513bd75ff6a547c557579c0bc095d555
Reviewed-on: http://gerrit.openafs.org/1086
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-01-12 21:56:58 -08:00
Jeffrey Altman
35ed0439e3 Windows: buf_Recycle should clean up flags and reset version
The CM_BUF_EOF and CM_BUF_ERROR buffer flags and the
buffer dataVersion should be reset within buf_Recycle()
instead of by the caller of buf_Recycle().

LICENSE MIT

Change-Id: I643da102553200b20f5ecc23ec43974581663a8e
Reviewed-on: http://gerrit.openafs.org/1085
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-01-12 21:56:43 -08:00
Jeffrey Altman
edc39892cb Windows: do not leak scp->dirlock if cm_BPlusDirBuildTree fails
In cm_BeginDirOp, the scp->dirlock would be leaked if
cm_BPlusDirBuildTree() failed.   This would either result in
a panic later on if lock order validation is active; or as
an inability to process subsequent requests on the directory.

LICENSE MIT

Change-Id: I03afd0c9e6296c0f43ae39e5a7b1ff29a1619a43
Reviewed-on: http://gerrit.openafs.org/1083
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-01-12 21:56:27 -08:00
Jeffrey Altman
6a96e0bf92 Windows: alter nmtest CreateFile modes
Change -r to open the file for FILE_SHARE_READ

Change -w to open the file for FILE_SHARE_WRITE

Change -w to open the file twice.  Once for sequential access
and once for random access.

LICENSE MIT

Change-Id: I295a7e7408e7e7eac06901108a726fe9e94bf18f
Reviewed-on: http://gerrit.openafs.org/1016
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-01-12 21:55:47 -08:00
Jeffrey Altman
6f4ed82da9 Windows: return ENOMEM from cm_BPlus functions on malloc failure
There are several cm_BPlus functions that do not return
an error code on malloc failure.

LICENSE MIT

Change-Id: I3a3d78cc6d6844c78e51fa81ebf330f5af88a7a5
Reviewed-on: http://gerrit.openafs.org/900
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-01-12 21:55:29 -08:00
Simon Wilkinson
987f3bf9c7 Use dget_parent to handle getting inode of parent
We can't safely do dp->d_parent->d_inode to access the parent inode
of a given dentry. Instead, use dget_parent() to get safely get a
reference on the parent dcache, and access the inode using that
reference. Dispose of this reference with dput() as appropriate.

Change-Id: Ic4f2159f68f95744bca08ebc99ecd5f45dc46966
Reviewed-on: http://gerrit.openafs.org/1075
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-12 10:44:21 -08:00
Matt Benjamin
90f91f4464 freebsd: CM changes targeting RELENG_8
Force all vnodes onto the fs mount queue when allocated.  This fixes
a long-standing vnode recycling problem.  Don't call vgone() on a vnode
whose refcount is 0.  Always destroy vnodes in VOP_RECLAIM.  This is work
in progress towards fixing old reclaim bug mentioned in Rees comment.
Hold vnode returned from gop_lookupname_user in afs_pioctl_syscall,
to avoid it going inactive before we're finished.  Also unlock it if
necessary.  Don't use custom vop_lock impl when AFS_FBSD80_ENV.  Remove
duplicate conditional code in vnode pretty-print (old cruft).  Also don't
format fid members as hex. Revert vn_lock exclusve in osi_VM_StoreAllSegments
(fixes deadlock introduced by me in a 2009 changeset).  Remove unused
variables in osi_VM_StoreAllSegments.

Change-Id: I9fd146d6f405382a20a75523ec2b75c62ac6d17a
Reviewed-on: http://gerrit.openafs.org/1068
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-12 10:44:06 -08:00
Andrew Deason
7c24f66047 DAFS: avoid saving fileserver state when panicing
When ShutDownAndCore is called with dopanic=1, avoid trying to save
fileserver state. When we are panic'ing it is very possible that the
thread that called ShutDownAndCore is one of the background threads we
are waiting for, or that the calling thread is holding H_LOCK. Since we
are panicing, the fileserver state is probably not consistent anyway, so
just avoid trying to save state altogether, and avoid a possible
deadlock.

Change-Id: If727808bfdfda74a4ec0e65b27ef9c77fbee4aae
Reviewed-on: http://gerrit.openafs.org/997
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-01-12 10:26:43 -08:00
Andrew Deason
fe07f017f7 DAFS: Allow non-fileserver to schedule salvages
Allow non-fileserver programs to schedule salvages through the fileserver
via FSSYNC (VOL_FORCE_ERROR with the FSYNC_SALVAGE reason code). Also
make the volserver schedule salvages this way when it encounters the
appropriate errors.

FIXES 124484

Change-Id: I03ecf6302436c35fec705cd6c84a40b7cdbf6f97
Reviewed-on: http://gerrit.openafs.org/787
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-01-12 08:52:01 -08:00
Simon Wilkinson
9a08865c36 Revert "Linux: Replace invalidate_inode_pages"
This reverts commit 40719534d5.

RHEL5 kernels publish the invalidate_mapping_pages symbol as
EXPORT_SYMBOL_GPL, so we can't use it with them.

For now, revert this change - we can live with the deprecated
warning at present...

Change-Id: I22875683e643c4184bb2c1e06f37d4c6eb9ea0be
Reviewed-on: http://gerrit.openafs.org/1082
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-08 10:53:17 -08:00
Derrick Brashear
165571947b linux kernel lacks uintptr
sadly only recent kernels include uintptr_t. change the cast to use unsigned
long

Change-Id: Ib69f7aa0f2d316c5ea8bdc960b15ee0f89f96250
Reviewed-on: http://gerrit.openafs.org/1059
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-01-07 17:13:41 -08:00
Chas Williams - CONTRACTOR
708dc95501 UNIX CM: remove the last remaining reference to afs_rxglobal_lock
Somehow this was missed earlier.

Change-Id: Iebebdb90cb42cc9ef716409af435509916e4ab58
Reviewed-on: http://gerrit.openafs.org/1078
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-07 16:30:10 -08:00
Chas Williams - CONTRACTOR
f72207d8c4 LINUX/: ifdef for GFP_NOFS conditionals
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>
2010-01-07 14:37:17 -08:00
Derrick Brashear
fcce9a4727 darwin module prototype and cleanup
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>
2010-01-06 14:12:43 -08:00
Dan Hyde
8f689aec14 volmonitor copy link before calling free
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>
2010-01-06 12:32:03 -08:00
Simon Wilkinson
c37b9230c5 Linux: Mark our super block as not updating access time
We don't update access times, so mark our mount options as such.

FIXES 126084

Change-Id: Ic1591b943288dae45267676046f78e02c306ec08
Reviewed-on: http://gerrit.openafs.org/1071
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-06 08:22:24 -08:00
Simon Wilkinson
e34702ef89 Linux: Use the correct ATIME flag
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>
2010-01-06 08:21:29 -08:00
Derrick Brashear
b2433a3e4c cachemanager additional cleanup
integrate support for additional cachemanager cleanup. free
volume, server, unixuser objects. cleanup messages printed at shutdown.
zero/null/init additional locks and structures.

FIXES 126069

Change-Id: Id00219b679a0b4ad15ca06fc16335b0e4282e0eb
Reviewed-on: http://gerrit.openafs.org/1065
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-01-05 10:51:23 -08:00
Derrick Brashear
c03980f710 macos code signature for afsd
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>
2010-01-05 10:51:03 -08:00
Andrew Deason
6e82a621e6 Refuse to attach inode partitions with UFS logging
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>
2010-01-05 10:19:56 -08:00
Marc Dionne
94ff83fee8 Linux: don't oops on writeback if vcache has no stashed credentials
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>
2010-01-05 10:19:01 -08:00
Michael Meffie
747a8c0642 viced: allow alternate addresses on the same hash chain again
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>
2010-01-05 10:18:44 -08:00
Simon Wilkinson
daff400662 Fixes for supergroups on Darwin 64bit
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>
2010-01-04 16:24:13 -08:00
Jeffrey Altman
e4eb19cdc0 Unix CM: Use xdr_free to free memory allocated by XDR
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>
2010-01-03 16:21:45 -08:00
Matt Benjamin
54c4ce48bf freebsd: fix afs_root signature (RELENG_8)
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>
2010-01-03 16:18:08 -08:00
Marc Dionne
a5d054668a Build fix: restore centry in ptutils.c
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>
2009-12-31 09:00:45 -08:00
Russ Allbery
4d6d786668 Remove warnings from supergroups code on x86
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>
2009-12-31 05:10:49 -08:00
Russ Allbery
1526593621 Correct spelling errors in man pages
Correct several spelling errors in the man pages detected by Debian's
Lintian package checking tool.

Change-Id: I3834a12776ec5e27b04d80fbfcc43ffe71cf1790
Reviewed-on: http://gerrit.openafs.org/1051
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-12-31 05:09:40 -08:00
Matt Benjamin
64cacab28b freebsd: track RELENG_8
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>
2009-12-31 05:08:29 -08:00
Simon Wilkinson
e4708157ea Linux: Check for multiple silly renames
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>
2009-12-31 05:06:11 -08:00
Simon Wilkinson
ec352e0bfd Abstract out Linux sillyrename function
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>
2009-12-31 05:04:02 -08:00
Simon Wilkinson
35d5b6c4e1 Remove unused configuration tests
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>
2009-12-31 05:01:46 -08:00
Simon Wilkinson
16a824222b Remove HAVE_STRUCT_BUF test
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>
2009-12-31 05:01:26 -08:00
Simon Wilkinson
f545882014 Remove --disable-full-vos-listvol-switch option
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>
2009-12-31 05:01:08 -08:00
Simon Wilkinson
5364fada4e Remove --disable-afsdb
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>
2009-12-31 05:00:30 -08:00
Derrick Brashear
0fce88e079 clean up axscache at shutdown
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>
2009-12-31 04:57:00 -08:00
Andrew Deason
d11ca53be7 Make DAFS 'bos salvage' work in restricted mode
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>
2009-12-31 04:56:10 -08:00
Simon Wilkinson
12f35e8493 Remove --disable-largefile-fileserver
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>
2009-12-31 04:55:31 -08:00
Simon Wilkinson
f085951d39 Turn on bos restricted code
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>
2009-12-31 04:54:52 -08:00
Russ Allbery
bd4c636e91 Update .gitignore for copied rxkad files
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>
2009-12-31 04:53:18 -08:00
Simon Wilkinson
c45e2b374b Linux: #if BLAH should be #if defined(BLAH)
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>
2009-12-30 22:49:18 -08:00
Michael Meffie
dab6cbadd6 missing brace in afs_get_sb
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>
2009-12-30 15:22:52 -08:00
Simon Wilkinson
187630ed3e Unix: Rename aklog_main.c as aklog.c
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>
2009-12-29 18:24:57 -08:00
Simon Wilkinson
da8c26533d Unix: Merge aklog with aklog_main
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>
2009-12-29 18:24:36 -08:00
Derrick Brashear
6ec1846164 avoid leaking stat info
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>
2009-12-29 18:22:33 -08:00
Andrew Deason
6c9d49d096 Return a cell name from afsconf_LookupServer
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>
2009-12-29 18:20:29 -08:00