make sure when AFSOP_STOP_RXEVENT is set, a wakeup is sent on the
variable so waiters realize it's the case
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/162
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Corrects a few places throughout the tree where ctime() is incorrectly passed a
pointer to an afs_uint32 or similar fixed-width datatype, instead of a pointer
to a time_t.
FIXES 124538
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/100
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
DRelease is used to free data blocks returned by the dir package. These
can be any of a number of different types, which we were previously
dealing with by casting everything to (struct buffer *) before calling
DRelease.
Instead, make DRelease take a (void *), so we can free any dir package
product without requiring casts.
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/159
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Clarify the situations in which $< can be used, as we do use it in
some places in the tree. It is sufficiently portable in pattern rules,
but should not be used elsewhere
Also, change the function definition example to match the format used
through out the source tree.
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/160
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
the mode needs to be provided before src dest; do so, so we get boot scripts
again
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/156
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
The problems were
* wrong location of Makefile.version-CML
* lots of omissions of "$?" in favor of actual file names in Makefiles
* wrong dependencies in pam/Makefile.in
The latter now point to TOP_INCDIR. Still, ktc.c could not be built
from src/pam (buildtree), as include "..." would not work on generated
headers. Therefore, it uses include <...> where appropriate now.
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/155
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Take care of various warnings (about 70) during a libafs build.
A non-exhaustive list of changes:
- Unused variables, in some cases to be IFDEFed along with the code
that uses it
- Cast some const char * to char * for the afs_* functions
- Move afs_UFSCacheFetchProc and afs_UFSCacheStoreProc declarations
to afs_prototypes.h
- Include afsutil.h in error_msg.c to get strlcpy
- Change type of argument 3 in export_sysname, to match what the callers
are actually doing
- Rework a few lines in pthread_glock.c to avoid a warning about unused
value
- Fix a warning in rpc_scan.c that really looks like a bug (but
probably harmless in our case)
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/151
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Add missing conditional to fix building on
linux 2.4.
FIXES 125120
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/148
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reported by Marc Dionne
Fix two sets of ifdefs in rx.c required for RXPACKET_DEBUG.
LICENSE BSD
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/152
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Don't try to build kdump on linux 2.6 where it has been known to be broken
for a long time. The build failure was ignored, but produced a large number
of errors and warnings, polluting the build log.
On a test amd64_linux26 system with a recent kernel and --enable-warnings,
this results in over 750 fewer warnings and 100+ fewer errors.
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/150
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Fetch and Store procs now live in the new source file afs_fetchstore.c
Reviewed-on: http://gerrit.openafs.org/106
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Russ Allbery <rra@stanford.edu>
in order for gethostbyname to be satisfied for util.a, -lnsl is needed
Reviewed-on: http://gerrit.openafs.org/146
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Replace "0x%x" with "%"AFS_FMT_PTR for pointer printing in all locations
where gcc flags a warning.
This change is warnings reduction driven - there are many more
occurences of this in the code which don't currently result in
compiler warnings, because the va_args functions they're used in
aren't defined as printflike.
Reviewed-on: http://gerrit.openafs.org/75
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
The afs_warn() and afs_warnuser() functions take a variable number of
arguments. Historically, we've handled this by just not prototyping
them. This change builds on the work done a while back to get a
prototyped osi_Panic() working in the kernel, and contains the same
work arounds for platforms with no usable va_args support (HPUX) and
those where support is limited (some Darwin, some Linux)
Reviewed-on: http://gerrit.openafs.org/27
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Russ Allbery <rra@stanford.edu>
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
For some reason, the code was, on all platforms other than Digital
UNIX, assigning the return value of catopen to an integer, with
and then immediately assigning it to an nl_catd (the actual return
value type). Remove all of that and store the return value directly
in an nl_catd variable.
Reviewed-on: http://gerrit.openafs.org/93
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Verified-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
fstrace was searching for its message catalog first through the normal
NLS message catalog search paths and then falling back on the client
configuration directory. This, however, is neither a traditional
message catalog for internationalization nor is it a configuration file.
Instead, search for the message catalog only in a C directory under
AFSDIR_CLIENT_DATA_DIRPATH, which is for architecture-independent data,
and simplify the code.
Now that we have a standard location for the message catalog, install
it with make install as well as make dest.
Reviewed-on: http://gerrit.openafs.org/92
Verified-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The same lines appears 17 lines up. So it is already done.
But here we shouldn't do it again after having released the
write lock in tdc and tdc itself
Reviewed-on: http://gerrit.openafs.org/79
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Add AFSDIR_DATA_DIR to dirpath.h, defined to be the location for
installing and finding architecture-independent data files. Add a
corresponding AFSDIR_CLIENT_DATA_DIRPATH macro that retrieves the
possibly-prefixed version of this path. This will be ${datadir}/openafs
with normal UNIX installation paths and /usr/vice/etc for Transarc
paths. Since there is no apparent need for this path on Windows, it
is not defined in Windows builds.
The only intended use for this path for right now is the message
catalog for fstrace.
Reviewed-on: http://gerrit.openafs.org/91
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
DisplayFormat2 is used to generate volume output for ListVolumes
and ExamineVolume. If the volume status is not VOK, the name field
will not have been populated with valid data. Do not print it.
This commit also removes an extraneous switch block from
XDisplayFormat2. The switch variable is already known to
have the value VOK due to an enclosing conditional.
FIXES 125111
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/140
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Derrick Brashear <shadow@dementia.org>
The sub-make invocations in libuafs ignored the return code of the make,
which allowed the libuafs build to appear to succeed even if files had
failed to build. Fix this.
Reviewed-on: http://gerrit.openafs.org/74
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Make things build on MacOS 10.6 again. Don't break 10.5 build.
Fix an error in the MacOS port which was left from previous head.
Reviewed-on: http://gerrit.openafs.org/96
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
NSIS.i386 build rule must build the NSIS directory, not the NSIS.i386
directory.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/105
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
fstrace had its own copy of the NLS catopen/catgets/catclose library
functions only on OSF platforms prior to 2.0 with the functions
renamed to add a "1" (which looked cut and pasted from somewhere
else). This is old enough that we no longer support that platform,
so drop all of that code and partly untangle the #ifdefs to remove
the pre-2.0 OSF case.
Reviewed-on: http://gerrit.openafs.org/88
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reported by Marcus Watts.
print_addr() accepts a afsUUID* and must not pass the address of
that variable to ubik_VL_GetAddrsU.
LICENSE IPL10
Reviewed-on: http://gerrit.openafs.org/101
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Remove all uses of "register" from the src/WINNT source tree.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/104
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Many Windows files were not included in the .gitignore files.
Many directories did not have .gitignore files at all.
Add and update where required.
LICENSE IPL10
Reviewed-on: http://gerrit.openafs.org/103
Verified-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Fix an off by one error in assert() to avoid printing garbage
characters to the log. Remove the newline character generated by
ctime() to match the format generated by the other logging functions.
FIXES 124613
Reviewed-on: http://gerrit.openafs.org/102
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Ignore SIGSYS when we issue the pioctl syscall, so we don't dump core
when the kernel module hasn't yet been installed on several platforms.
Also, restore the old SIGSYS signal handler afterwards, so we don't
cause any side-effects.
Reviewed-on: http://gerrit.openafs.org/81
Verified-by: Andrew Deason <adeason@sinenomine.net>
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
InterlockedAdd() is not supported on all the platforms we wish to
support. However, InterlockedExchangeAdd() is. The two
functions are semantically similar with the exception that
InterlockedExchangeAdd() returns the initial value of the object
being modified while InterlockedAdd() returns the resulting
value. Since the return value of the rx_MutexAdd() macro is
unused, this is irrelevant.
Reviewed-on: http://gerrit.openafs.org/98
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reported by Marcus Watts
Pointer arithmetic is inappropriate when attempting to output
one of the elements of an array or C-string.
LICENSE IPL10
Reviewed-on: http://gerrit.openafs.org/90
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reported by Marcus Watts
ListCellsRPC calls RXAFSCB_GetCellServDB which takes a serverList
and not an array of afs_int32. Add the serverList and copy the
resulting server addresses into the array of afs_int32 address
values.
Include afs/afscbint.h instead of afs/afsint.h in order to obtain
prototypes for RXAFSCB_ functions.
Reviewed-on: http://gerrit.openafs.org/89
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reported by Marcus Watts
The next field of struct volinfo is supposed to be a pointer
to a struct volinfo.
LICENSE IPL10
Reviewed-on: http://gerrit.openafs.org/87
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reported by Marcus Watts.
principal_hton() is used to copy butc_principal structs.
Passing in a ktc_principal as source and destination will
result in beyond the end of the ktc_principal.
LICENSE IPL10
Reviewed-on: http://gerrit.openafs.org/86
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reported by Marcus Watts. Two calls to ctime() in the same
fprintf() statement will result in only one of the times being
printed twice. This is due to the fact that ctime() returns
a static buffer.
LICENSE IPL10
Reviewed-on: http://gerrit.openafs.org/85
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
For many years the Windows Build System has incorrectly mixed
some Pthread and LWP code. One of the side effects of this
mixing was the need for the EXT2 extern macro definition in
src/rx/rx_globals.h which permitted the LWP compiled routines
to link with the Pthreaded afsrpc library.
This commit creates or modifies multi-threaded versions of various
libraries including mtafsubik.lib, mtafsutil.lib, mtafsvldb.lib,
and mtafsvol.lib.
All of the threaded servers now make use of these libraries.
This reduces the number of times that many source files were
recompiled for each server directory.
util_GetInt32 was defined in both src/util/volparse.c and
src/WINNT/afsd/fs_utils.c. Now that mtafsutil.lib is being
used within src/WINNT/afsd there is no need to maintain the
duplicate copy.
The export list for afsauthent.def now includes all of the
ubik_PR_xxxx function variants and afsrpc.def now include
rxi_CallError as it is linked to outside the rx library.
The top-level NTMakefile has been modified to permit the
tree to build with the new header and library dependencies.
The threaded volserver which never built before now does.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/77
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Verified-by: Asanka Herath <asanka@secure-endpoints.com>
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Replaced some references to the Authentication Database with Kerberos.
Removed text about obsolete tools like rcp, inetd, and rlogin.
Corrected references to AFS Product support by replacing them with links
to the OpenAFS Support page. Added warnings about using the wrong fsck binary
with inode and namei-based fileserver binaries. Removed an obsolete paragraph
about ThisCell and how it interacts with the Authentication Database.
LICENSE BSD
FIXES 124931
Reviewed-on: http://gerrit.openafs.org/10
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Within cm_MergeStatus() cm_FindVolumeByID() was called with
a NULL pointer instead of a valid cm_req_t object pointer
in the case where the data version for an object received
from the file server is smaller than the value already stored
in the cache. This results in a NULL pointer dereference.
Allocate a cm_req_t object on the stack and initialize it
before calling cm_FindVolumeByID() in this case.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/83
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Generate the correct paths when building transarc style paths.
Remove the redundant dirpath shell script that was generated by the
afs-newcell script. Update the run-tests driver to use the build
time generated dirpaths.
FIXES 124976
Reviewed-on: http://gerrit.openafs.org/80
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Russ Allbery <rra@stanford.edu>
Prototypes and warning fixes for the cache manager when built as
part of libuafs
Reviewed-on: http://gerrit.openafs.org/73
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Capabilities are defined in the .xg file as being an array of
unsigned integers. Implement them as such on Windows, too.
This is a Windows version of the fix in
7191005e4d
Reviewed-on: http://gerrit.openafs.org/76
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Add a util_GetHumanInt32 function for parsing numbers human-readable
units using single-character, uppercase suffixes for indicating orders
of magnitude (e.g. 'M', 'G').
Use this function to parse human readable values for all arguments
that previously accepted a value in kilobytes: fs setquota, fs
setcachesize, vos setfields, and vos create.
Reviewed-on: http://gerrit.openafs.org/66
Verified-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Link the PAM modules against libafsauthent_pic and libafsrpc_pic instead
of the large collection of LWP AFS libraries so that they are always
built PIC, even on platforms that don't normally build everything PIC.
This also uses the pthread-aware version of the AFS routines on platforms
that support it, avoiding conflict problems between LWP in PAM modules
and pthread in a calling application.
Build a separate copy of ktc.krb.o in the pam directory for pam_afs.krb
since there is no AFS_KERBEROS_ENV-aware version of libafsauthent.
Enable the PAM module build by default on x86_64-linux now that it's
properly built PIC and can compile.
Stop ignoring build failures in the PAM modules if they're configured to
build. On platforms where they should not be built, they should be
excluded in acinclude.m4.
Reviewed-on: http://gerrit.openafs.org/65
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
ktc_curpag isn't specific to a Kerberos v4 environment, so move it outside
the AFS_KERBEROS_ENV #ifdef. Add it to the auth.h header and to the
exports from the shared libafsauthent.
Reviewed-on: http://gerrit.openafs.org/64
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Capabilities are defined in the .xg file as being an array of unsigned
ints. Implement them as such.
Reviewed-on: http://gerrit.openafs.org/72
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove some unused variables and isolate items that are demand attach only
Reviewed-on: http://gerrit.openafs.org/71
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Other functions included in libafsauthent and libafsrpc are using strlcpy
and strlcat, so include those objects in the libraries so that they stay
self-contained.
strlcat and strlcpy shouldn't be part of the public API for the libraries,
for various reasons including the fact that they're not built on all
platforms. Therefore, don't add the functions to the library exports and
include them separately in each library.
Reviewed-on: http://gerrit.openafs.org/63
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Derrick Brashear <shadow@dementia.org>
Fix a problem introduced by the recent parallel make patches - the
resulting kernel module was not getting copied to the install or
dest location.
Copy some of the code from the COMPDIRS target for INSTDIRS and
DESTDIRS. We still have to call into the lower level make and have it
install the module.
Reviewed-on: http://gerrit.openafs.org/67
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
There are a number of places in the tree which are missing system
headers such as <unistd.h> <ctype.h> and <dirent.h>. Add these.
Reviewed-on: http://gerrit.openafs.org/62
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
With the old print format quota and used values became one large
number for quotas in the terabyte range.
Fix alignment of the "no limit" string in the Windows fs command
for volumes with no quota.
Reviewed-on: http://gerrit.openafs.org/34
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>