Expand the 'rxinfo' function so that it is not rxkad specific, and
add the framework to allow other security classes to be added to it.
Change-Id: Idb514be6aafbc69154a7aba4b0ece3330b8b3aed
Reviewed-on: http://gerrit.openafs.org/5031
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The kas manual test is kauth/kas-man, not kauth/kas
Change-Id: I714cbbf78af7f8e99ec52d9c0f173df3f6ae18c5
Reviewed-on: http://gerrit.openafs.org/5030
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
In the bsd.kmod.mk world, the compiler bails when we cast a pointer
directly to int. Cast through intptr_t as the supported mechanism.
On amd64, this loses bits, but since this instance is just attempting
to use the value as a unique handle, it is probably okay for now.
However, it should be addressed more properly eventually, when
this locking implementation sees wider use.
Change-Id: I4fe8084c14a97dc4efc8d74e9971b1540c028e40
Reviewed-on: http://gerrit.openafs.org/5034
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The two lines above it already used </ufs/ufs/...> correctly.
In the bsd.kmod.mk world, this will let us get rid of some
more symlink hackery in libafs, since the system's '@' symlink
will point to the system headers directly.
Change-Id: I97dd779c2c7a119f51972b02e185a17264911151
Reviewed-on: http://gerrit.openafs.org/5036
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Commit ffb6864f0f is missing some
semi-colons in assorted dest rules, which breaks the make dest target.
Change-Id: Ie6f88878604f1043256f1683e1d228e16d568f50
Reviewed-on: http://gerrit.openafs.org/5037
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
In this caller to krb_realms, when no realms names are returned the
number of local realms is correctly set to zero, however the first
local realm buffer is filled with a placeholder string which is
not used. Remove the uneeded strncpy, which also makes this
section of code consistent with afs_is_foreign_ticket().
This section of code is duplicated by afs_is_foreign_ticket() and
should be consolidated in a subsequent patch.
Change-Id: I48f84934e7321769eebaf80c83b2c100fd026a6a
Reviewed-on: http://gerrit.openafs.org/5020
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>
Tested-by: Derrick Brashear <shadow@dementia.org>
Alter the prototypes in afs_usrops.h to avoid using the name "new", in
order to make the header usable by C++ code.
Change-Id: I21165b5c1e33e9229172d9f8e797d65fc954bb77
Reviewed-on: http://gerrit.openafs.org/5038
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Use defined(...) in two instances to avoid warnings.
Change-Id: I0a574283e2384c7cfb2f58884570e78e3fed3bc6
Requested-by: Simon Wilkinson
Reviewed-on: http://gerrit.openafs.org/5005
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Apply a two-clause BSD license to src/util/pthread_threadname.c. Note
that the claim of copyright in this file refers to the derivative work
consisting of the original code combined with the text of the license.
Change-Id: Id75badee03cb85a23778088aa9cb49d8c92eb5d0
Reviewed-on: http://gerrit.openafs.org/5025
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The configure help text for --enable-pthreded-ubik says
"enable installation of pthreaded ubik applications"
This patch set makes the behaviour in the code match that. Instead
of controlling whether the pthreaded ubik code is compiled at all,
the configure option now just controls whether it is installed. This
means that we'll always build the pthread code, and so should reduce
the number of times it is inadvertently broken.
Change-Id: I8b2ffb46e01157f2043cf7daf68e69580ea285c5
Reviewed-on: http://gerrit.openafs.org/5028
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Fix the dest and install rules for pthreaded ubik, and its servers, so
that they match the current Makefile style.
Change-Id: Ifd3bd181772e278518f2a90167b6524d6045645c
Reviewed-on: http://gerrit.openafs.org/5027
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
afsutil_prototypes.h can reference pthread_t when we are in
AFS_PTHREAD_ENV. So, include pthread.h to guarantee we get the
definition for pthread_t.
Change-Id: Ib46c2cf3b3fdd2dcd61a7b8ac4d5512fecd084ff
Reviewed-on: http://gerrit.openafs.org/5023
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Because we missed it in gerrit/4815.
Change-Id: I653c4259a0bbe926abac80c09e32ff3bc35f2de2
Reviewed-on: http://gerrit.openafs.org/5022
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
this won't fly with the gcc in the field most places. move along.
Change-Id: I54de25c4986e574ca5b34b850807b10374d9d8ad
Reviewed-on: http://gerrit.openafs.org/5013
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Fix a build error in the cmd tap tests.
Change-Id: I757c5b508784fd938b70ca3829130275707dd39a
Reviewed-on: http://gerrit.openafs.org/4975
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
rxkad's ticket5.c includes v5gen.c, a generated file from Heimdal.
This file contains a load of set-but-unused variable warnings. As we
currently have no way of portably suppressing just these warnings,
turn off warnings-as-errors for ticket5.c
Change-Id: I739cee4f345523fce130c73c713c7309273f5bee
Reviewed-on: http://gerrit.openafs.org/5003
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
restorevol reads the magic number from the dump, then does nothing
with it. Rather than not reading it at all, just mark the variable that
it is read into as unused to supress the compiler warning.
Change-Id: I371e2556e3661836f6256fac255ae79005d9ffaa
Reviewed-on: http://gerrit.openafs.org/5002
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Throughout cm_server.c, input parameters to functions that
are protected by cm_serverLock are dereferenced by assignment
during variable initialization prior to the cm_serverLock being
obtained. As a result there is a race which can result in
either list corruption or dereferencing freed memory.
Change-Id: I4fa42b9ae0af5eb7c44ea868b4ea6ca9e4e0bb92
Reviewed-on: http://gerrit.openafs.org/4985
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
The inode list wasn't being initialised before the first call into the
error handler. This makes it possible that we end up trying to discard
items from an uninitialised list, with all the chaos that would cause.
Fix things so that this list is correctly set up.
Change-Id: I5dbc33e2e1a9a4ca1bdf4b2f7e56f33af87ccc1a
Reviewed-on: http://gerrit.openafs.org/5001
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The return code from GetVolInfo was being thrown away, and success
returned to the caller, regardless of the success of this function.
As GetVolInfo's exit codes aren't suitable for sending over the wire,
just return ENODEV if this function returns failure.
Change-Id: Ie4adbbd98f5006a9aa50ed9bf73ea9e4344fabf3
Reviewed-on: http://gerrit.openafs.org/5000
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
When we're building an inode fileserver, we use the nearInode hint.
The IH_CREATE macro just throws this hint away if we're building namei,
which leads to compiler warnings about set-but-unused variables. Just
flag nearInode as being potentially unused in order to suppress these
warnings.
Change-Id: I25022dc859974e9311e4530a9eeee8ab1d77c373
Reviewed-on: http://gerrit.openafs.org/4999
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Now that we're always using an int64, and never a hyper_t, to represent
64bit integers, we can just print them out and assign them using the
native tools, rather than having to call SplitInt64. Simplify our code
to do so, which also avoids some gcc-4.6.0 warnings.
Change-Id: I12cfb5401d0431be2a4fefdfc5e1f52df7d5764d
Reviewed-on: http://gerrit.openafs.org/4998
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
main always return 0, so don't bother getting an exit value back from
cmd_Dispatch that we have no intention of doing anything with.
Change-Id: I0085adbfdb886d89acc7f4203ddb6f7a10281dfc
Reviewed-on: http://gerrit.openafs.org/4997
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove assorted unused variables, both those used to capture error
returns, and so unused (but initialised) string pointers, to make
gcc 4.6.0 happier.
Change-Id: I8cdcfb7175b48c79ce2b1a312d6a5fe6ab5c1989
Reviewed-on: http://gerrit.openafs.org/4996
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove unused error returns, and make gcc 4.6.0 a little bit happier
Change-Id: Ic1fe541ed860a739ac3e2aa2978cbb8b92ec1a8d
Reviewed-on: http://gerrit.openafs.org/4995
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
A number of functions in the libadmin vos implementation set up
error values, and assign them to 0, but never actually use them
for anything (either further assignment, or returning to the user)
So, just remove these unecessary variables, and make gcc 4.6.0 a
little happier.
Change-Id: Ia4a4a7d8cda855d904f2a84092928f227ea83f3b
Reviewed-on: http://gerrit.openafs.org/4994
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This removes a couple of unreported error code assignments. Firstly,
the return from 'setsid' was being assigned to 'ec' and promptly
ignored, and secondly, the response from SendNotifierData was
being ignored. As there is nothing sensible to do with these error
codes, just ignore them properly.
Change-Id: Ifff8c7b5b7950e467570d26ce5f92fe5f11a51e9
Reviewed-on: http://gerrit.openafs.org/4993
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tidy up the afsmonitor code to remove gcc 4.6.0's set-but-unused
variable warnings. These are all assignments to error code
values which are never checked, or reported.
Change-Id: I8d48a6defe848d7cf477ac747aa330fc8ed1b276
Reviewed-on: http://gerrit.openafs.org/4992
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
At one point afs_StoreAllSegments had an optimisation to speed up
stores. However, that optimistation used the chunkLength without
taking appropriate locks, and was disabled. The variable assignments
which still exist from this code cause errors with gcc 4.6.0, so just
remove them.
Change-Id: I86547d94280d7f07214fbf6ef5b3db61c9781e59
Reviewed-on: http://gerrit.openafs.org/4991
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The PrefetchFromTape pioctl had a number of set-but-unused variable
warnings. Tidy up the code to remove these warnings.
Change-Id: I358f7e31ab8e9f03447675be40dc8571650dbe72
Reviewed-on: http://gerrit.openafs.org/4990
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The PrefetchFromTape pioctl was overloading SetAcl's statistics. Give
it a slot of its own.
Change-Id: I5698f8861af1b5e9771d138ca93a28f676df349b
Reviewed-on: http://gerrit.openafs.org/4989
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The LRU code in osi_dnlc_lookup has never been enabled in OpenAFS,
and causes compilation errors with gcc 4.6.0 - just remove the unused
code and its associated variables.
Change-Id: Ifc09bbb857406b9bfcbf436c35e36289567f65cf
Reviewed-on: http://gerrit.openafs.org/4988
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove unused code which used to retry once when a server was
marked down due to a bad NAT. This code has never been enabled
in OpenAFS, and causes compile errors with gcc 4.6.0
Change-Id: Idc978a68e81ccb761117c97200607e30c98627dc
Reviewed-on: http://gerrit.openafs.org/4987
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
A previous change added support for setting thread names/titles to
viced; this change moves the #ifdef spaghetti to src/util in
preparation for calling it from other places where it would be
useful. Two functions are defined, one for setting an arbitrary
thread's name (as might be done by the spawning thread) and one
for setting the current thread's name; the latter is also defined as
a macro for non-pthreads compilations so that it can be called
unconditionally (the interface does not reference any
pthread-specific data types). Note that some platforms, Mac OS X
in particular, do not allow setting the name of a different thread.
The two functions are defined as no-ops for Windows as our pthreads
emulation layer for Windows does not provide the needed mechanism.
Make viced use the new interface.
Change-Id: I58c65a28772d8d188c03d6ff3a6f052889362fb7
Reviewed-on: http://gerrit.openafs.org/4966
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add targets to generate distribution tarballs, and srpms, from a tree.
These will generate packages for whatever the current HEAD of the tree
is - if the HEAD is a release tag, then the packages will be named for
that release, if the HEAD is between releases, then git describe will
be used to create an appropriate version identifier.
The tarballs are generated from the current git repository contents,
anything not checked in will not be included.
Change-Id: Ic5cde2382f973a004406e0ef0f09708d0ba0ad5f
Reviewed-on: http://gerrit.openafs.org/4984
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Use the git version information when building RPMS, rather than hard
coding it into configure.ac.
Change-Id: I477629b4102f48a9669ff67aae429c08862a5afc
Reviewed-on: http://gerrit.openafs.org/4983
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
currently we have inode numbers which do not change. note it.
additionally, we support large files. note it.
Change-Id: I77090d3ccc3ba9952e14f2be13946ef2e91a6af7
Reviewed-on: http://gerrit.openafs.org/4973
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The config.h header for hcrypto defines an assert macro for
use by RX. OpenBSD already has an assert macro definition so
this new one causes screaming by the compiler about
re-definition. This patch adds the directives to remove any
pre-existing definition of assert, if one exists, prior to
defining the new one.
Change-Id: I01d5a1f26617fecfd0ffcc3930a7c7881beb8183
Reviewed-on: http://gerrit.openafs.org/4958
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Do not use the c preprocessor to redefine the SalvageVolumeGroup()
function name.
Change-Id: I3d48ee28dc03be702d0427d74725ff1e99ec6411
Reviewed-on: http://gerrit.openafs.org/4965
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
link shared libs from the right place, lib not etc
Change-Id: I3d58d1f65b479b7c23c1bb0978eacea99b114541
Reviewed-on: http://gerrit.openafs.org/4971
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Once upon a time, our specfile would assume that if you were
building for i386 you were building userspace, and that i586 or i686
implied doing a kernel only build. This is no longer the case, and
now everything on modern Fedora is built for i686, so we should adapt
the spec file for this.
Change-Id: Ia56b9b15d0b28672a8411417d38937ed45ee93a1
Reviewed-on: http://gerrit.openafs.org/4970
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
When we're doing version requirements in -devel package Requires:
lines, we should be using %{version}-%{release}, not just %{version}
FIXES 130137
Change-Id: I2d10c6fa362d3cbfa786c270996fa8ae75b9db20
Reviewed-on: http://gerrit.openafs.org/4969
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>