If the SecurityLevel registry value indicates that crypt should be
the default, then always set -encrypt for vos.exe and pts.exe.
Reviewed-on: http://gerrit.openafs.org/648
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
On ZFS, the disk space files can use up can be rounded up to the next
recordsize boundary if they've been truncated. This can cause the Unix CM
to mis-estimate cache usage, since it truncates files fairly often, and
assumes the disk space used is the file length rounded up to the next
f_frsize.
Since the ZFS recordsize is available via the statvfs f_bsize, just
round up to that instead. There is still some additional file metadata
that takes up some additional space on disk, but according to ZFS people
I've spoken to about this, it cannot be known in advance. In practice,
the additional metadata storage doesn't appear to exceed about 10% of
the data storage, which should be acceptable.
FIXES 125365
Reviewed-on: http://gerrit.openafs.org/650
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Add a new public header file volser_prototypes.h, which contains
prototypes for those volser functions that are used by the rest of the
tree, and link it into the Unix and Windows build systems.
Rename the current volser_prototypes.h volser_internal.h, and update
references to it.
Make those places that should use the new public header use it, and
re-enable warnings-as-errors as appropriate.
Remove the warning free files from the list in README.WARNINGS
Add butm_prototypes.h to butc/lwps.c, so we can enable warnings for that,
too.
Reviewed-on: http://gerrit.openafs.org/636
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add the new afsio binary to the appropriate .gitignore file
Reviewed-on: http://gerrit.openafs.org/637
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
When the HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
"ReadOnlyVolumeVersioning" DWORD registry value is non-zero, the volserver
will be queried for each .readonly volume to obtain the lastUpdateTime.
The lastUpdateTime will be used as a volume version identifier for each
cm_scache_t object stored in the volume. With a known volume version,
whenever a current status is obtained for any object within the .readonly volume,
all the cached objects within that volume that have the same volume version
can share the resulting callback registration.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/579
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Remove all OutputDebugString calls from the explorer shell extension.
OutputDebugString() requires acquiring system global locks.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/643
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
The error codes that should be returned when a lock request
fails are:
STATUS_LOCK_NOT_GRANTED for an explicit lock request
STATUS_SHARING_VIOLATION when a CreateFile fails due to a previous lock
Correct the service to ensure that these values are in fact returned.
Also, add 'fsLockCount' field to cm_scache_t and dump its value
as part of the "fs memdump" output. This permits some ability to
identify what the file server thinks the lock count is.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/646
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Rx RTT calculations are based on Van Jacobson's work using
constants that make computations fast but are not necessarily
the best for modeling Rx protocol exchanges. This patch does
not alter the constants but does improve the comments to show
that the math is correct.
Phil Karn in 1987 demonstrated that Van Jacobson's algorithms
produced inaccurate results when the RTT computed from an
acknowledgement of a retransmitted packet were included. The
resulting RTT would either be too small causing the system to
retransmit too many packets or too long resulting in too few
being sent.
This patch follows Phil Karn's advice which was also adopted
as mandatory for TCP in RFC2988. Retransmitted packets and
delayed acks are skipped and the retransmit time is backed off
(up to a maximum of 3 seconds) until a successful acknowlegement
is received for an initially transmitted packet.
LICENSE BSD
Reviewed-on: http://gerrit.openafs.org/580
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Make consistent use of AFS_PROC in portable and mixed files, adding the define
for platforms which lacked it. This completes a change that has been ongoing
for several years.
LICENSE BSD
Reviewed-on: http://gerrit.openafs.org/642
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This reverts commit 6133d25397.
This patch breaks builds on RHEL5.3 - revert it until we can come up
with a fix.
Reviewed-on: http://gerrit.openafs.org/640
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Modify cm_FindServerByIP to search by port as well.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/607
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
When the file server fetchdata offset bug is triggered and detected,
not only do we have to behave as if 'length_found' is zero, but we
also must ignore the RXGEN_CC_UNMARSHAL error that will be returned
from rx_EndCall() due to the parsing error that occurred during the
rx_Read32() call.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/634
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Fix the kmem_cache constructor function to match the current
expected prototype, and cleanup related code. This has been wrong
for a while, but since we were just passing extra parameters the
only effect was to generate a warning.
- Add a new configure test to detect the new constructor function
signature
- Define the older versions of the constructor in osi_compat.h,
making them call the current version
- Move a few compatibility #defines to osi_compat.h
- Clean up the call to kmem_cache_create by introducing an inline
afs_kmem_cache_create in osi_compat.h
Reviewed-on: http://gerrit.openafs.org/621
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Commit 906403c6d7 introduced a warning by
making 'error' unused anywhere. Remove the declaration, as well.
Reviewed-on: http://gerrit.openafs.org/620
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
A typo in c717fcd32c removed the = before
the first head1 in vos_remsite.pod. Put it back.
Reviewed-on: http://gerrit.openafs.org/612
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Larger collection of all vos suite commands, including but
not limited to:
-- documented all commands / options, verified against both 1.4 and 1.5 tree
(including the common -encrypt/-noresolve options)
-- correct order, POD formatting and synopsis for all commands' options
-- shorthand synopsis provided for all commands that missed it, with proper
non-ambiguous command abbreviations of all options
-- POD synopsis formatted to 80-columns in commands where it was running over
-- for newer options, documented which OpenAFS version they became available
-- proper manpage links using L<> in vos.pod
Reviewed-on: http://gerrit.openafs.org/609
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Squash a few miscellaneous that appear when building vos.c:
-- CreateVolume should use util_GetUInt32 to parse vol ids, since they
are now unsigned
-- The m_uuid argument of print_addrs is altered, so do not declare it
const
-- Declare the confDir argument of ugen/vsu_ClientInit to be const,
since it does not change, and vos.c passes a const confDir in
MyBeforeProc
-- Ignore implicit function declaration warnings and remove
CFLAGS_NOERROR from the vos.c build, since the only remaining
warning is an implicit function declaration
Reviewed-on: http://gerrit.openafs.org/602
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Some miscellaneous warnings throughout rxkad:
rxkad/ticket5.c:
- Explicitly cast ticket blob to unsigned char*, as some functions take
a ticket as a char*, and some take it as an unsigned char*
- in tkt_DecodeTicket5, make 'start' and 'end' be unsigned, since that
is what their callers think they are
- Ignore implicit function declaration warnings (for CRC functons)
- Remove general warning inhibition
rxkad/ticket.c:
- in tkt_DecodeTicket, make 'start' and 'end' be unsigned, since that
is what their callers think they are
- Remove general warning inhibition
rxkad/v5der.c:
- In decode_enumerated, use der_get_unsigned instead of der_get_int,
since we're decoding an unsigned integer.
rxkad/rxkad_server.c:
- The last two arguments to rxkad_DeriveXORInfo are char*s, so
explicitly cast them to be so
- Remove general warning inhibition
rxkad/rxkad_common.c:
- rxkad_stats_t has had a couple of spares transform into
clientObjects/serverObjects; account for them and don't overrun the
spares array
Reviewed-on: http://gerrit.openafs.org/600
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
cmd/cmd.c:
- Just make dummy be a struct cmd_item instead of casting
rxdebug/rxdebug.c:
- Access the stats packet through a union instead of casting and
dereferencing
util/uuid.c:
- Access the seed through a union and an array instead of that
incrementing-pointer approach
Reviewed-on: http://gerrit.openafs.org/599
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
xdr_alloc must be used instead of malloc in SRXAFSCB_GetLocalCell
and SRXAFSCB_GetCacheConfig
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/606
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Commit 36be36e034 introduced some casts
from an integer type to void *. This generates warnings on a 64-bit
platform.
Use uintptr_t casts to make the compiler happy.
Reviewed-on: http://gerrit.openafs.org/605
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Permit DNS SRV record lookups to be used by the Windows afsconf_GetAfsdbInfo
As per the published DNS SRV internet draft for the AFS3 protocol,
DNS SRV records are to replace AFSDB records as the primary method
of looking up AFS3 service location information.
In order to make that happen for Windows:
1. afsconf_GetAfsdbInfo must be able to translate from internal service
names to IANA assigned service names.
2. The Windows getAFSServer() API must accept IANA service and protocol
parameters as well as the port number to use if AFSDB record fallback is
required.
3. The Windows cache manager must pay attention to the port number
stored within the sockaddr_in structure instead of using hard coded
values based upon the server type.
For afsconf_GetAfsdbInfo, in addition to searching for the requested
IANA service, if that service is prserver or kaserver fallback to
the vlserver record (if any).
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/593
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Callers of xdrproc_t functions give the function a foo* as the second
argument, not a foo**, and the xdrproc_t functions themselves expect
this. Make the xdrproc_t typedef accurately reflect that, thereby
ridding us of some warnings.
Reviewed-on: http://gerrit.openafs.org/603
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Some warnings were ignored in libafsrpc, but not in shlibafsrpc. Ignore
them in both places.
Reviewed-on: http://gerrit.openafs.org/601
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
-- The EP/ep function does not return anything; declare the function pointer
accordingly
-- Explicitly cast &stackvar to char* to avoid a warning
Reviewed-on: http://gerrit.openafs.org/598
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
-- In ka_Authenticate, explicitly cast 'start' and 'end' to void*,
since kawrap_ubik_Call takes all arguments as void*s
-- Fix kawrap_ubik_Call to not be an old-style declaration
-- Only ignore strict prototypes and implicit function declaration
warnings
Reviewed-on: http://gerrit.openafs.org/597
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Explicitly cast eparm to a long in afs_syscall when calling
proc_afs_syscall, to avoid a warning.
Reviewed-on: http://gerrit.openafs.org/596
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
If we HAVE_STRCASESTR, we lack the prototype for strcasestr in
afsmonitor.c unless we def _GNU_SOURCE before including string.h on GNU
systems. To avoid side-effects or pulling in extra stuff, just prototype
strcasestr ourselves for the time being (if we have it) instead of
def'ing _GNU_SOURCE.
Reviewed-on: http://gerrit.openafs.org/595
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
On *nix, a size_t needs either %lu or %u to be interpolated in a string,
depending on if we're on an ILP32 arch or not. Define AFS_SIZET_FMT
accordingly, and actually use AFS_SIZET_FMT when we try to print a
size_t.
This removes numerous -Wformat warnings, at least when building on
i386_linux26.
Reviewed-on: http://gerrit.openafs.org/592
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
New users are surprised when OpenAFS command options
cannot be prefixed with two dashes, as is common
with most modern tools. Permit an extra dash for
common commands when more than one character is
given. For example vos listvol --server foo.bar.com is
equivalent to vos listvol -server foo.bar.com, but
vos listvol --s foo.bar.com is an error.
Reviewed-on: http://gerrit.openafs.org/216
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This should ease the ingtegration for Windows.
Instead RXAFS_FetchStatus is called.
Reviewed-on: http://gerrit.openafs.org/590
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
With this commit afsio builds on Windows. It will not work
until the VIOC_FS_CMD OSD extension is implemented in the
Windows Cache Manager.
Required changes:
* Export ugen_ClientInit from libafsauthent.dll
* Fix util_GetInt64 and util_GetUInt64 to return afs_int32
instead of afs_int64 since it is just returning success
or error
* Define VIOC_FS_CMD for Windows even though it isn't implemented
LICENSE BSD
Reviewed-on: http://gerrit.openafs.org/587
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Right now, if you convertROtoRW a volume on namei, the converted volume
appears to need a salvage before it is usable, and the header of the old
(now empty) RO volume is kept around. Fix this:
-- Set inUse = 0 on the converted volume, so the fileserver will be
able to attach the volume when we give it back
-- Unlink the RO header file, instead of trying to unlink the
VI_VOLINFO file twice
-- Log the actual error code (errno) in the error message for the last
unlink
Reviewed-on: http://gerrit.openafs.org/591
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Since time began, Linux has provided page_offset() to turn a
page index into an offset into the corresponding file. Make us use
this everywhere we calculate a page offset, rather than doing our
own maths.
Reviewed-on: http://gerrit.openafs.org/581
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
right now we compare against /etc/services, and a hardcoded array.
but since there's no guarantee /etc/services will be useful, this
can mean inconsistent behavior. hardcode the iana names in the table,
and take the internal structure used private at the same time.
LICENSE BSD
Reviewed-on: http://gerrit.openafs.org/577
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>
prints 'fs setacl' commands necessary to create the current
ACLs. This is useful for backup scripts using TSM (or others)
to save the ACLs into a file to allow for later restore.
Reviewed-on: http://gerrit.openafs.org/556
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
As we're being built by the standard Linux module build system, we
can use the normal #include <linux/blah.h> convention from including
kernel headers.
Reviewed-on: http://gerrit.openafs.org/582
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
OpenAFS preference pane has been updated to manage the new launchd startup mode. Has been delete the custom startup and shutdown file now is user the /Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.rc
OpenAFS.postinstall has been modified to remove the old existing /Library/StartupItems/OpenAFS directory
OpenAFS.pre_upgrade has been modified to shutdown daemon, if it is runnig, and remove the old preference pane to permit the one to be installed
Reviewed-on: http://gerrit.openafs.org/578
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
afsio bypasses the cache manager to achieve higher throughput.
However, it uses the cache manager to stat or create files over the
AFS path.
Besides 'apropos' and 'help' there are 3 subcommands:
'write' pipes data into a new or empty AFS file
'append' pipes data at the end of an existing AFS file
'read' pipes data out of an AFS file
for 'write' there is an option '-md5' which calculates on the fly
the md5 chscksum and prints it to stdout. (Useful when you create
long time archives to keep it separately for later ...)
for 'write' there is also an option '-synthesize <size>' to do just
performance tests. It creates a file which contains at the
begin of each 4 KB block the offset printed in ascii.
for all subcommands exists a '-verbose' option which writes to
stderr data rate and timing information.
All three subcommands may also be used prefixed with 'fid' accepting
then a Fid instead of an AFS path. With the 'fid' prefix also a '-cell'
option is allowed.
Reviewed-on: http://gerrit.openafs.org/555
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>