6820 Commits

Author SHA1 Message Date
Simon Wilkinson
f5cfa4cf73 Unix CM: Fix negative file length case, again
As originally noted in f6f9ee5402f1718f330a00ec89fb34b05c3cd360
some fileservers return a negative length, typically when a client
is attempting to fetch data that is past the extents of the file,
the CM needs to retain this negative length, and handle it correctly.

c7b92a3018044f7aca4d9a77644e5c06ef64d1e9 added safety checks for
the fileserver returning a length larger than that asked for by
the client. Sadly, this check does a comparison between a
signed, and an unsigned, variable. This leads to it incorrectly
classifying negative responses as being too large.

Add a cast, and a comment, to fix this.

Change-Id: I2ca67f55204c565667d5cd91cde3d520f8d9b10c
Reviewed-on: http://gerrit.openafs.org/1109
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-16 07:00:34 -08:00
Jeffrey Altman
df70221027 Rx: Correct AFS_NT40_ENV rx_GetIFInfo max MTU assignments
On UNIX, the rx library values for rx_maxReceiveSize and
rx_MyMaxSendSize are sent by the cache manager directly.
In Windows, they are set by rx_GetIFInfo() which had two
errors.

(1) The comparison of rx_maxReceiveSize and maxsize were
    reversed which prevented rx_maxReceiveSize from ever
    being set to the interface MTU.

(2) rx_MyMaxSendSize was never assigned a value.

As a result, two problems occurred.

(1) The remote peer was never told about the local MTU.

(2) The local peer ignores the MTU.

From 1.3.60 to 1.5.33, OpenAFS for Windows installers
provided a registry default RxMaxMTU of 1260.  This caused
the cache manager to call rx_SetMaxMTU() which in turn set
both rx_maxReceiveSize and rx_MyMaxSendSize in effect
masking these errors.

Change-Id: Ib05927d7985052e233ff6f4bd170a939eb05c320
Reviewed-on: http://gerrit.openafs.org/1107
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-01-15 18:05:34 -08:00
Jeffrey Altman
c5d9f23cde Rx: Do not drop call lock in rx_WriteProc* and rx_ReadProc*
rx_WriteProc and rx_ReadProc has special fast logic that
handles the most frequent case.  This code was called
without obtaining the call lock. However, each of these functions
must obtain the call lock for the queue_IsNotEmpty() test and
must re-obtain the call lock if the rxi_XXX variant is required.
Dropping the lock and re-obtaining it is more expensive than
holding it across the memcpy.  Therefore, we shouldn't drop the
lock until we are done.

Change-Id: Icca679567994e91bbbf3afec72b863d986f86582
Reviewed-on: http://gerrit.openafs.org/1108
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-01-15 18:02:15 -08:00
Jeffrey Altman
c1b74af750 Rx: Remove last remnants of DJGPP support
DJGPP code just clutters the AFS_NT40_ENV specific code
but is never built.

Change-Id: I90192bb5cf35239fdbbeaa28f85d1381162f3bae
Reviewed-on: http://gerrit.openafs.org/1106
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-15 06:24:38 -08:00
Marc Dionne
d4c97c0017 src/pam warning fixes
The second parameter to pam_conv() should be a const pointer on
recent systems.  Make it so to eliminate a couple of warnings.
A configure test is added to deal with some systems where pam_conv()
might not be const.

Cast a few assignments to cell_ptr in afs_auth.c and afs_setcred.c
since the argv parameter is const.

Change-Id: I5757310c94a6f26ca7dab656edaa416d16e32e2a
Reviewed-on: http://gerrit.openafs.org/847
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-14 20:46:30 -08:00
Asanka Herath
62e4bf7ddd Fix typo in AdminGuide
</pare> -> </para>

Change-Id: If0f8183f59f038b1b5e033d5ebd2607b5091f6da
Reviewed-on: http://gerrit.openafs.org/1103
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
2010-01-14 16:20:58 -08:00
Dan Hyde
d4f6ece19b volmonitor keep vtrans lock
VolMonitor must maintain the VTRANS lock the whole time it is walking
the allTrans list.  Failure to do so can cause core dumps trying to
access memory that has already been free'd.

Two versions of this change were coded and tested.  The other version
used the VTRANS lock only around a THOLD, but needed a TRELE, too.
Timing tests were run counting the number of vos status, vos listvol,
and vos backupsys operations that could be performed during a fixed
number of vos status operations.  The THOLD/TRELE version caused other
vos operations to run about 5% slower.

FIXES 126110

Change-Id: I7e749d30c955867faacafa978d7d643dee648ca3
Reviewed-on: http://gerrit.openafs.org/1098
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-14 08:10:08 -08:00
Simon Wilkinson
64778fd7be Kernel is always defined
When we build the kernel module, either in the real or the ukernel
case, KERNEL is defined. So, remove the #ifdefs around our locking
primitives, so that things are a little bit clearer.

Change-Id: I60893cc630d8cd4dd6cb11cdc44e8bf4f2f9f863
Reviewed-on: http://gerrit.openafs.org/838
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-14 07:50:11 -08:00
Simon Wilkinson
1a027a3ee1 Move GLOCK initialisation to platform directories
Rework the GLOCK initialisation code so that it's moved out into
platform directories, rather than all being done in osi_Init.

Change-Id: I1aae76ba12cd4e45f54881f5573ed1713159b64b
Reviewed-on: http://gerrit.openafs.org/837
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-14 07:47:59 -08:00
Chas Williams
39b59269e5 rewrite afs_MemWriteBlk() using afs_MemWritevBlk()
this avoids the code duplication of extending/shrinking cache entries

Change-Id: Ieeae668caa506e934f92edf193b99dabdba2eabe
Reviewed-on: http://gerrit.openafs.org/1062
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-14 07:31:14 -08:00
Chas Williams
9984a95687 Quick fix for readpages when using memcache
Just don't do readpages if we're using memcache

Change-Id: I6b8b45f291d106ad1303d5bea1caf7f910b7ecf4
Reviewed-on: http://gerrit.openafs.org/1061
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-14 07:26:21 -08:00
Chas Williams - CONTRACTOR
18459cd32a afsd: decprecate -mem_alloc_sleep flag (and related code)
On most platforms, afs_osi_Alloc_NoSleep() is already afs_osi_Alloc().
I have tested this on Solaris (the major exception) and haven't seen
any problems.

Change-Id: I0e8bfd76b2bd25889c1491633a3a6d50aceac510
Reviewed-on: http://gerrit.openafs.org/1079
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-14 07:13:24 -08:00
Andrew Deason
1544243167 Always check VInitVolumePackage2 return code
Some programs were not checking the return code of VInitVolumePackage2.
Although some programs do not care so much if we fail to properly init
the volume package (SYNC debug tools), at the very least log/print an
error, so it doesn't silently fail.

Other programs are changed to exit when VInitVolumePackage2 fail, so
e.g. salvages don't accidentally cause corruption on 'logging'-mounted
UFS partitions.

In any case, ensure the return code is always checked anywhere it is
called.

Change-Id: I164d5920a5ea2dd7e5ed9ad4ccc578e9bdf0db0b
Reviewed-on: http://gerrit.openafs.org/1090
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-01-14 07:07:06 -08:00
Simon Wilkinson
9b23804a82 Remove weekly bosserver restarts
Change the default so new installations of the bosserver have
no weekly restarts. Update the manpage and XML documentation to
reflect this change.

FIXES 126138

Change-Id: Ic22b750a602f6d2a22be881f5e1b04cd4fa132ae
Reviewed-on: http://gerrit.openafs.org/1097
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-14 07:01:16 -08:00
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 40719534d5d906f97a6ae7d28a00289270daf2a6.

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