The decision to add AFS_AFSDB_ENV to make code consistent was
a mistake. The preprocessor symbol no longer exists. AFSDB
is broken in 1.5.69.
Change-Id: I7ea147b824f3a67e2039abee8b2513af175fcc5d
Reviewed-on: http://gerrit.openafs.org/1142
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Add a dependency rule to build bc.h before it is installed
Add cleanup rules to delete bc.h and other installed files.
Change-Id: I9a40fd64aff048bfc87b9fd823ae7499816cb3e5
Reviewed-on: http://gerrit.openafs.org/1139
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
The Windows v6.0 SDK does not define __RPC__out in the rpcsal.h
header file. The preprocessor symbol was added in the v6.0A SDK
update. In case the v6.0 SDK is used with the 6000 WDK, add a
symbol declaration.
Change-Id: Iecce566e906977f41be00efb458753acd09f7949
Reviewed-on: http://gerrit.openafs.org/1138
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Change I006bbbdb8923dbb72a97fde931a1b23e303375c2 broke
the Windows build. Restore the unlabled assignments for
Windows since Windows always uses the AFS xdr implementation.
Change-Id: I2eadc624d84f4100281424993b7287a330d6c753
Reviewed-on: http://gerrit.openafs.org/1136
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>
Cleanup some prototype related warnings under bucoord and butc:
- Copy a few prototypes from bucoord_internal.h to bucoord_prototypes.h,
since they are used in other source directories
- Install bc.h under include/afs, and include it in tcmain.c
- Include bucoord_prototypes.h in tcmain.c
- Add a prototype for GetResponseKey
- Remove warning inhibition for tcmain.c, and entry in README.WARNINGS
- Remove warning inhibition for bucoord/dump.c (no entry in README)
Change-Id: I0a0ae92d3c7ba75e4a331bf59ea9c031763cc704
Reviewed-on: http://gerrit.openafs.org/1134
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
instead of having use_fh for linux, vnode_path for solaris and darwin,
use the same mechanism for both. for darwin/solaris we cache the path
(tested via gop_lookupname) instead of an fh, freeing the path at
shutdown.
Change-Id: Id22052db0803264bdaba6b870d9e511953e348bc
Reviewed-on: http://gerrit.openafs.org/1132
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
add support for decoding (nominally) any panic for MacOS. Limited testing.
Requires hdutil from http://www.dementia.org/~shadow/dmgutil-0.1.tar.gz
to extract files from DMGs.
now with support for cross-version debugging, when run on 10.6 (e.g. with kextutil)
Change-Id: I5d9db005e3014e22f916070f8af25271a28615ea
Reviewed-on: http://gerrit.openafs.org/1125
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
hint to time machine that cache files should not be backed up
Change-Id: I098c9231139b91ff093be74d8a39f94c185d478c
Reviewed-on: http://gerrit.openafs.org/1122
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This fix modifies the way that the RX XDR operations are declared
so that UKERNEL can continue using the system provided XDR glue,
rather than using our own (as is the case in userspace, and in
normal kernel modules)
Change-Id: Ib6abad376c7f7a7f0f5c2314efe80f5b7b44f842
Reviewed-on: http://gerrit.openafs.org/1131
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Label all of the assignments to the xdr_ops structure. This allows
the rec, stdio and mem variants to continue to function, even when
the ordering of the elements has changed in the header.
Change-Id: I006bbbdb8923dbb72a97fde931a1b23e303375c2
Reviewed-on: http://gerrit.openafs.org/1126
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
sys_prototypes.h, afs_AdminErrors.h, and afs_Admin.h were being installed
into include/ in the build tree via ${INSTALL} instead of ${INSTALL_DATA}.
rx_prototypes.h was executable in the repository. Install header files
non-executable and make rx_prototypes.h non-executable for cleanliness.
Discovered by Lintian because the executable permissions were duplicated
by make libafs_tree.
Change-Id: I609b62f69d1fecc2cdbba7e7442d93e9675c2fa0
Reviewed-on: http://gerrit.openafs.org/1129
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Update the NetIdMgr provider help text to better describe its
functionality. (Or at least not be incorrect.)
Change-Id: I5d6b18f15cab7c48751666e754223ee68fb18d11
Reviewed-on: http://gerrit.openafs.org/1124
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
The OpenAFS plug-in for Network Identity Manager displays an icon
in the notification area that displays status information about
the AFS service and tokens. Add a context menu to the icon so
that users can open the NIM application and get help for the
plug-in from the notification icon.
Change-Id: I704934b4f4eab72a18c54ef2a7a7dc3ca248ba78
Reviewed-on: http://gerrit.openafs.org/1121
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
set version number for unix
Change-Id: I2273e97ec43fd172e6f486ab6226cc6376885163
Reviewed-on: http://gerrit.openafs.org/1123
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
this creates and installs a debugging kext package for macos. it also
always installs the decode-panic script (which can be used even without
the debug kext)
Change-Id: Iff03de66cd3df2690f03333e6629d21660364cd1
Reviewed-on: http://gerrit.openafs.org/1120
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Clear up a few more warnings in the pam code. The changes here
are very similar to the ones in the previous patch and use
the same configure test:
- use PAM_CONST to conditionally declare pam_message as const
- cast a few arguments to putenv, which expects a non-const pointer
Change-Id: I6c98623c35f4453f34c1d48b8b7d6ff1bfbc1e0c
Reviewed-on: http://gerrit.openafs.org/1116
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Variable pageSize is declared and set to the system page size
using getpagesize(), but the value is not used anywhere.
getpagesize() doesn't necessarily have a prototype declared in
unistd.h with recent glibc, which can generate a new warning and
trip up an enabled-checking build.
Instead of trying to put in a workaround, just remove the unused variable.
Change-Id: I6a9519eb2642bb0479edd1cf1195ce3f751c72bb
Reviewed-on: http://gerrit.openafs.org/1117
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
In uss_vol_GetServer(), the IP address octets are scanned into "char"
variables, and later cast to afs_int32 to build the address.
sscanf gives warnings because it's expecting an int pointer, and
testing shows that this code doesn't work as expected - the first
3 octets are always parsed as 0.
Use afs_int32 variables instead, which works, eliminates warnings and
simplifies the code.
Note that this code does not seem to be reachable currently.
It was probably meant to be used by planned additional uss commands.
Change-Id: I646d4cbfa8ac0d0c50f98a334ac3fe387d6d361b
Reviewed-on: http://gerrit.openafs.org/1119
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The syscfg_GetIFInfo() call uses the interface info returned by
GetAdaptersAddresses(). Also manually query the MTU value in the
registry for any interfaces bound to the same adapter and use the
smallest such MTU as the value returned by syscfg_GetIFInfo().
Change-Id: I8a1d487b51f6674ff6ebbf6b1f20d37b1e278279
Reviewed-on: http://gerrit.openafs.org/1105
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
If the rx_Read() of the number of bytes in the FetchData64 response
fails, then it sets code, and disposes of the call structure. However,
the length safety check that was added in
c7b92a3018 executes regardless of whether
code is set, and the call has already been freed. So we end up calling
rx_Error with a NULL call structure, and panic.
Change-Id: Ia2e341b7a9a2ddc1d656e8b8a31698c0d1771d5e
Reviewed-on: http://gerrit.openafs.org/1112
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
6e65ffbb6c added osi_get_group_pag.
On most platforms this is static, but on Linux it's provided by
the OSI layer. Add a prototype so the compiler doesn't go boom.
Change-Id: I106fa5d5299f8ed486e70cea2ea8681b43a81a33
Reviewed-on: http://gerrit.openafs.org/1110
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
As originally noted in f6f9ee5402
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.
c7b92a3018 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>