Commit Graph

8291 Commits

Author SHA1 Message Date
Andrew Deason
fa3584a48f RX: No userspace atomic_ops in Solaris pre-10
The atomic_ops(3C) family of functions do not exist in userspace
before Solaris 10. So, only use them for rx_atomic operations if
we're on AFS_SUN510_ENV, or if we're in the kernel.

Also, include <sys/atomic.h> for kernel code and <atomic.h> for
userspace. Although they are currently equivalent, they are documented
as separate, and pre-10 lacks <atomic.h>.

Change-Id: Id71857efcd6460f8223302850b548754c19d076f
Reviewed-on: http://gerrit.openafs.org/3652
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-12 19:25:54 -08:00
Derrick Brashear
6edcb18304 afsd: CellItems doesn't apply to memcache mode
avoid a potential panic from passing a bogus path into the kernel for
evaluation, in memcache mode.

Change-Id: Iaa11eded2e8946207f7df9e77c3de1e5ff4f963e
Reviewed-on: http://gerrit.openafs.org/3651
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-12 19:25:34 -08:00
Andrew Deason
6d03eef721 SOLARIS: Include sys/varargs.h for kernel stdarg
When compiling for the kernel, pre-10 Solaris seems to want
<sys/varargs.h> instead of <stdarg.h>, as documented in the Solaris
man pages. So include <sys/varargs.h> instead of <stdarg.h> where we
need variable arguments (afs_warn.c).

Change-Id: Id16453b1f7bb9f42d0cc9ca504ac64d04fb0b684
Reviewed-on: http://gerrit.openafs.org/3653
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-12 14:05:52 -08:00
Marc Dionne
8c54107957 Cache bypass: fix use of incorrect "states"
Test and set the correct field for cache bypass flags.  There was
some confusion between cachingStates and the states associated with
vcache entries in a few places.

Change-Id: Iae957b6f838a44d75776e49662b4aba685800d19
Reviewed-on: http://gerrit.openafs.org/3637
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-01-11 08:35:21 -08:00
Andrew Deason
336256c7a0 LINUX: afs_linux_put_link is void
The put_link callback doesn't return a value, so declare it as such.

Change-Id: Icdc19de48747fdfbd3349b2ef0c2b51d5a369550
Reviewed-on: http://gerrit.openafs.org/3636
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-10 12:27:42 -08:00
Stephan Wiesand
8d157961e9 rpm: don't package files twice
The LICENSE and two manpages were included in the main
package as well as one of the others. Remove duplicate entries.

Change-Id: I7626d758a65fe305f18e7cc9099d1fe1b4f86c6f
Reviewed-on: http://gerrit.openafs.org/3628
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-10 12:27:14 -08:00
Andrew Deason
60322b4675 git-version: Do not specify --ignore-submodules
Only new git versions reognize the --ignore-submodules option to
diff-index and diff-files. Do not pass this, to make git-version more
likely to work across different versions, as we don't have any
submodules in the tree anyway.

Change-Id: Ic9dbd9ec5f332f36cec291fc3d324db14615f831
Reviewed-on: http://gerrit.openafs.org/3627
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-10 12:26:53 -08:00
Jeffrey Altman
9f584e8114 Windows: refactor buf_Get() to improve readability
Refactor buf_Get() by using a switch() instead of a jumble
of if() conditionals.

Improve comments to make it clear that given the current
use and implementation of cm_BufRead() from cm_dcache.c
that created buffer pages will never be populated with
actual data.

Change-Id: Ib3f5778ae32f210127537e16ecc32e1598dbefc7
Reviewed-on: http://gerrit.openafs.org/3630
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-10 11:54:42 -08:00
Jeffrey Altman
f58b17a615 Windows: remove all refs to unused buf_GetNew()
Change-Id: I09b87a2042efff1b5930ebe6e50a64379d592bc2
Reviewed-on: http://gerrit.openafs.org/3629
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-10 11:54:28 -08:00
Tom Keiser
3f0c08ad93 provide more verbose logging when VGetVolumeByVp_r fails
FSYNC_com_VolOff() commits sepuku when VGetVolumeByVp_r() fails to return
a heavyweight ref to the volume.  This small patch provides more detailed
debugging information so we have a better idea why VGetVolumeByVp_r failed.

Change-Id: I9b8b6e734653701c4f35b458f4c4701a2b0d2d5e
Reviewed-on: http://gerrit.openafs.org/2969
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-04 18:17:20 -08:00
Jeffrey Altman
9bb6b06c76 Windows: remove unused vars from cm_server.c
Change-Id: Ia2e1d5ecbc5dbc349ac8e7bfcb63b42545f876f5
Reviewed-on: http://gerrit.openafs.org/3617
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-04 08:41:43 -08:00
Jeffrey Altman
3ab948769c Windows: netidmgr_plugin move roken.h to afscred.h
Due to historical issues with the MIT KFW headers
the netidmgr plugin must define _USE_32BIT_TIME_T
which alters the size of time_t in all C RTL data
structures that include it.   roken.h must be included
after this definition in order for it to do the right
thing in conjunction with the MIT KFW headers.  This
means that an exception to the rule that roken.h must
be one of the first three files included in every
source file in the tree must exist for this directory.
In the netidmgr_plugin directory, afscred.h includes
roken.h and afscred.h is the first header included
in all other files.

Change-Id: I11214e5eaac0144aaf04c3a21bb92d521d75c6e1
Reviewed-on: http://gerrit.openafs.org/3616
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-04 08:41:16 -08:00
Jeffrey Altman
605b7c3baa Windows: permit clean when switching platforms
When switching between i386 and amd64 in the same build tree
the "clean" make directive would fail due to NTLang.bat not
having been built in the new platform's destination directory.
Force NTLang.bat to be built as a dependency of cleanup and
delete it at the end along with the version files.

Change-Id: I49a44204c636ab9ad89be44d4fad20ed6050fdda
Reviewed-on: http://gerrit.openafs.org/3615
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-03 18:24:15 -08:00
Simon Wilkinson
bf163cbebf roken: Check for bswap16 and bswap32 defines
Our imported roken.h provides definitions for bswap16 and bswap32,
but configure doesn't check to see if those functions already exist.
On operating systems where they do, and where the header containing
them is included in our build, this results in compilation errors.

Add a configure test for bswap16 and bswap32, which is complicated
by the fact that they may be macros, or static inline functions, so
a simple CHECK_FUNCS won't work.

Change-Id: Iae3411bf4bb22af8cfd770e01026a28e1863e078
Reviewed-on: http://gerrit.openafs.org/3613
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-03 06:38:42 -08:00
Simon Wilkinson
735f5b0515 Unix CM: Don't blow up if we have non-rxkad tokens
The legacy GetToken compatibility code assumed that we would always
have at least one rxkad token for a cell, and segfaulted if we didn't.

Just return as if we have no tokens if a cell doesn't have an rxkad
token.

Change-Id: Ica64882c1a64cf140ad6c277c70fbfb747ea6235
Reviewed-on: http://gerrit.openafs.org/3614
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-03 06:38:18 -08:00
Simon Wilkinson
c8fc94fb86 autoconf: Tidy up header includes
Tidy up our list of header includes so it's easier to see what
we're testing for. The list is now one-per-line, in alphabetically
sorted order.

Note that this won't affect our use of the default include set, as
autoconf will already have tested for all of those before it starts
this CHECK_HEADERS run.

Change-Id: Iffc8c3bc7cbd56d87508ebdde38e61f8747d0501
Reviewed-on: http://gerrit.openafs.org/3612
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-01-03 06:37:45 -08:00
Simon Wilkinson
a0adc8cd6e auth: Move key related code to its own file
Move all of the libauth code which does KeyFile management out
into its own file, in preparation for a major rewrite.

Change-Id: Id880136307cba726c04a003700ba70f3d74b297f
Reviewed-on: http://gerrit.openafs.org/3611
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-01-02 06:20:43 -08:00
Simon Wilkinson
cfee25cdc8 libadmin: Don't use internal struct for key data
The afsconf_dir structure should be regarded as private to the libauth
library, which provides accessors for the commonly used parameters
within it. Rework libadmin so that it uses those accessors when looking
up key data.

Change-Id: I9a623ccadba95622894931ee25319d3bcb019136
Reviewed-on: http://gerrit.openafs.org/3608
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-01-02 06:20:24 -08:00
Simon Wilkinson
e0efb936ff tests: Add more tests for auth KeyFile handling
Add tests to make sure that we serialise updated KeyFiles to and
from disk correctly, and that the restriction on 8 keys in a KeyFile
is enforced by AddKey

Change-Id: Iac5bf7157534879824da92ea58f1515672d59298
Reviewed-on: http://gerrit.openafs.org/3610
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-01 21:21:53 -08:00
Simon Wilkinson
4d7a0615d8 roken: Export more snprintf symbols
Export more of the snprintf symbols from librokenafs, so that we
can actually make use of them.

Change-Id: Ida347c516bec6444d26d0e148ffd781999f0b364
Reviewed-on: http://gerrit.openafs.org/3609
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-01 21:21:23 -08:00
Simon Wilkinson
13ae3de3f6 Add "brief" option to rxgen
Add a new -b option to rxgen that turns on "brief" output. This makes a
number of changes to the data definitions produced by rxgen so they can
be more easily used by the calling code.

The changes are:
   *) Use the new struct rx_opaque structure for all opaque data
      definitions, rather than defining each as a unique structure.
      This permits moving opaque data between rxgen structures to be
      performed by simple assignment.
   *) Use anonymous structures for internal definitions. Currently
      rxgen also uses the field name as the structure name, which
      prevents the use of a field name more than once within a
      source file.
   *) Don't embed the structure name within the names of the elements
      within the structure. This significantly reduces the length of
      assignment code, and makes for more readable callers.

Change-Id: I8cad7e6051f12238a77cf006b0854fb38b54f61a
Reviewed-on: http://gerrit.openafs.org/2585
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-01 21:19:51 -08:00
Simon Wilkinson
b114faf52f rx: Implement rx_atomic_dec_and_read
Add a function which decrements an atomic counter, and returns the
result. This is essential for implementing reference counting.

Change-Id: Ib173f078bcf117369a82f981d58124018648a71c
Reviewed-on: http://gerrit.openafs.org/3581
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-01 19:22:03 -08:00
Simon Wilkinson
50b1c161e8 rx: Protect rx_atomic.h against multiple inclusion
Add #ifdef guards so that rx_atomic.h can't be included in the same
C file multiple times.

Change-Id: Ic62287ce4a21b9efbfd9530e2517029a69217a56
Reviewed-on: http://gerrit.openafs.org/3580
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-01 19:20:28 -08:00
Simon Wilkinson
1879e1bce2 auth: Don't crash if UserList contains bogus line
If the first line of the UserList was bogus (caused ParseLine to
return an error), then we would attempt to free the contents of
an uninitialised identity structure, and crash. Initialise the
structure so this no longer happens.

Change-Id: I55074a5eb616ac48d8a278db2d8389d3b0e112a6
Reviewed-on: http://gerrit.openafs.org/3607
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-01 19:18:43 -08:00
Simon Wilkinson
a7fb426259 rx: Don't crash when emptying an empty identity
In common with our other freeContents functions, freeing the contents
of a structure which is already empty shouldn't crash.

Change-Id: I93b54c0e450d2184c10575b50dadfd1471d43289
Reviewed-on: http://gerrit.openafs.org/3606
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-01 19:18:28 -08:00
Vincent Archer
616763cd07 Windows: MIT license applies to parsemode()
Vincent Archer grants permission to OpenAFS to re-license
his MINIX contributions under the MIT license.  A copy of the
e-mail granting permission is located in OpenAFS RT issue 128805.

FIXES 128805

Change-Id: I59774d14a0099f5a48dbc9dbf13157136b8c681f
Reviewed-on: http://gerrit.openafs.org/3605
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-30 08:46:41 -08:00
Jeffrey Altman
b6576d8cb5 Windows: buf_CleanAsync scp->fid == bp->fid
If buf_CleanAsync or buf_CleanAsyncLocked are called
with a non-NULL cm_scache_t parameter, that status object's
fid must be the same as the associated cm_buf_t object.
If not, the wrong locks will be held.

If the cm_scache_t parameter is NULL and cm_FindSCache()
returns NULL, it means that the cm_scache_t object associated
with the bp->fid has been flushed from the cache.  cm_GetSCache()
must therefore be called to allocate a new status object for the
FID.  If the status object cannot be allocated, then any dirty
data stored in the buffer will be discarded.

Change-Id: Ie5d4eb8a1090d4b3c0753b7ddee2de0799485a2e
Reviewed-on: http://gerrit.openafs.org/3604
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-29 11:50:22 -08:00
Jeffrey Altman
4e32073357 Windows: fs checkserver skip multi-homed up server
Multi-homed file servers can be detected by comparing the
uuid for the cm_server_t entries.  If a server has at least
one up interface, do not list it as being down in the "fs checkserver"
response list.

Change-Id: I718eeee3316d05a33a4af97ca6c7fd947db41f44
Reviewed-on: http://gerrit.openafs.org/3603
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-28 13:12:06 -08:00
Jeffrey Altman
e4b59c6339 Windows: fs checkservers should list vldb as well
The Windows fs checkservers has only listed offline
file servers.  Include vldb as well to match the Unix
cache manager.

Change-Id: I81b8e4a1a813fcd8f19e3dc58c75ef161795518c
Reviewed-on: http://gerrit.openafs.org/3602
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-28 13:11:52 -08:00
Jeffrey Altman
463b045b9f vos: do not mix memory allocation methods
ListVLDB mixed memory allocated with xdr_alloc() and memory
allocated with malloc().  This is not safe to do since it is
possible on some platforms for xdr_alloc() to allocated memory
using a method other than the malloc() linked to the vos
executable.

Instead of stealing the xdr_alloc()'d buffer, allocate a new
buffer and copy the contents.

Change-Id: Icdda3d4d0b7c15464fe7f48123f3e0ebed4c2cc5
Reviewed-on: http://gerrit.openafs.org/3600
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-28 07:03:17 -08:00
Jeffrey Altman
8e9fff9ed8 Windows: cleanup preprocessor definition namespace
Do not use reserved preprocessor symbol names.  Instead
use OPENAFS_<PATH>_<HEADER>_H formatted names where <PATH>
is the subdirectory path from src/ in which the header
file originates in the repository.

Change-Id: I998d7feeddeb9660f3fc514e2ba752c54e402a24
Reviewed-on: http://gerrit.openafs.org/3599
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-28 06:57:37 -08:00
Jeffrey Altman
683747b9c4 Windows: separate parsemode from fs into own file
Separate parsemode() from fs.c into parsemode.c.

Restructure the function prototypes and the fs.h header
to permit building fs.exe from multiple source files.

Change-Id: I80840899706fd585addd165edc13a9e79928427a
Reviewed-on: http://gerrit.openafs.org/3591
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-28 06:57:14 -08:00
Jeffrey Altman
a7836dda8c vos: free ubulkentries with xdr_free
Instead of using free() to free the ubulkentries data structure
use xdr_free().

Change-Id: I367e984d1777fcc8a3ec81b501174fae2fd0c8ff
Reviewed-on: http://gerrit.openafs.org/3590
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-27 16:45:20 -08:00
Simon Wilkinson
9f17cef3d3 tests: Add tests for afsconf_'s key functions
Add tests for all of the public functions that afsconf exports
to manipulate KeyFiles. Include a sample Keyfile to start with, to
ensure that we can continue to read KeyFiles produced by current
versions of the code.

These tests are here to catch regressions with a forthcoming rewrite
of KeyFile handling.

Change-Id: I02aaff82aa7e1b7a73981c7cf26a81164e0dd932
Reviewed-on: http://gerrit.openafs.org/3598
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-27 14:39:37 -08:00
Simon Wilkinson
8992210f27 Don't trust # of entries from ListAttributes
ListAttributes returns the number of entries in its array as an RPC
argument. But, we can't trust this, as it could be manipulated and
end up pointing past the end of the returned array (which is counted,
so the entries argument is actually pointless).

Add bounds checking to the functions which use this value to prevent
this problem.

Change-Id: I62398d8f6b5c54318c1a42f1bad67a21c90ef944
Reviewed-on: http://gerrit.openafs.org/3597
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2010-12-27 12:21:54 -08:00
Andrew Deason
95ef4cfd39 Remove extra trailing \s in Makefiles
Remove a few extra trailing \s in Makefiles in viced and bozo. Some
'make's (such as the make on HP-UX) interpret this to e.g. include the
following "headers=" stuff to be included in LIBS, which obviously
causes problems.

Change-Id: I7a49ce5b8d40636bb3b4fe7978aa25b5411c7eed
Reviewed-on: http://gerrit.openafs.org/3575
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-27 12:02:45 -08:00
Simon Wilkinson
02a2f60050 volser: Fix broken bulk conversion
The converstions between the original, N and U bulk list return
values were all broken in various ways:

1/ Shifting from malloc to xdr_alloc() (in 4f1efdc8b7)
   subtly changed the behaviour when handling an empty list. The
   correct XDR representation of an empty list is {0, NULL}, not
   {0, &memZero}. Fix the code so that if the source list is empty,
   an empty destination list is returned.
2/ The destination list length was never being filled in. This means
   that xdr_free() could not be safely used on this list, as the wrong
   length would be passed to the allocator. Fill in the destination
   list length as part of the conversion.
3/ xdr_free(...) is a no-op when called with an empty list - there's
   no need to check before calling it. Remove these checks to improve
   the code's readability.
4/ xdr_free(...) should only be called when the RPC returned
   sucessfully. The stub is responsible for freeing data should the call
   fail mid way through unmarshalling.
5/ Where an RPC returns the number of entries independently of the
   length of a counted array, it is unsafe to use that length to
   iterate the array without checking that it is within the array
   bounds. Instead, just use the array length when performing
   conversions.

Change-Id: Ied9a77849062e5a1e506f13d4d90d116cefe41e4
Reviewed-on: http://gerrit.openafs.org/3596
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2010-12-27 11:56:23 -08:00
Simon Wilkinson
3503f32848 vos: Abstract out bulk list conversion
Pull the various segments of code that do bulk list conversion into
their own functions. This is purely code reorganisation at this point,
fixes for these functions will follow in subsequent patches.

Change-Id: I941e94aaf776ece85f041d02f5bdbaad5cf5b129
Reviewed-on: http://gerrit.openafs.org/3595
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2010-12-27 11:19:36 -08:00
Andrew Deason
b3c3fe137e Link hcrypto before roken
We must e.g. -lafshcrypto before we -lrokenafs, since stuff in hcrypto
can use functions provided by roken (such as ct_memcmp or
rk_cloexec_file). Fix any users of LIB_hcrypto that do not do this to
put LIB_roken after LIB_hcrypto.

Change-Id: I55f5589a521ed7da7a6692d817e94f18076ff4bc
Reviewed-on: http://gerrit.openafs.org/3584
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-27 09:56:09 -08:00
Russ Allbery
676a4efc23 Update NEWS for 1.5.78 and 1.6.0pre1
Based on the release notes.  Add an entry for 1.6.0 with in progress
instead of a date to hold the release notes for 1.6.0pre1 rather than
creating separate entries for each release candidate.  Users who track
the release candidates can refer to the public announcements, and this
will be cleaner when reading history later on.

Change-Id: I8d14dd0ec030e3d047f1d2e85c888c1d86e7f3c0
Reviewed-on: http://gerrit.openafs.org/3592
Tested-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-26 10:59:02 -08:00
Simon Wilkinson
83ac1558b6 auth: Add more tests and resulting fixes to userok
Add tests for the functions afsconf_SuperUser() and
afsconf_SuperIdentity(). These had been missing tests because testing
them requires starting a client and a server, so amend the superuser-t
tests so that they can start up a simple server.

Fix a number of problems that the tests expose, with setting (and
freeing) identities in corner cases.

Change-Id: I29f5f9eda7f532c98183d588e488d704f8efad88
Reviewed-on: http://gerrit.openafs.org/3593
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-26 10:58:49 -08:00
Derrick Brashear
affc978be7 DAFS: listvol + unsalvagable volumes = intolerable delay
a non- inService volume (or more) plus vos listvol equals pain.
return Salvaging instead of waiting for it in the listvol case.

Change-Id: I02bdbb6448bcf56e97db9324aa723cc753a37632
Reviewed-on: http://gerrit.openafs.org/3588
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-23 11:09:05 -08:00
Andrew Deason
651f66b0ff Prefer libHcurses over libcurses
Use the HP-UX-specific libHcurses instead of libcurses, like we used
to. Otherwise we fail to link some gtx programs.

Change-Id: I7b8a012d5d263c611a144e05466c5435b5ff310a
Reviewed-on: http://gerrit.openafs.org/3583
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-22 20:32:29 -08:00
Andrew Deason
1bc2329972 HPUX: Put __HP_CURSES back in
We need __HP_CURSES to be defined in order to get the _maxx WINDOW*
field among other things. Define it on HPUX again (it was taken out as
part of 4a6a00d6f4).

Change-Id: I3a17f270a034d97eea04580b8eae98a1784b5640
Reviewed-on: http://gerrit.openafs.org/3582
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-22 20:32:10 -08:00
Simon Wilkinson
e9e52ebc46 rx: Make rx_atomic.h a shared header
Copy rx_atomic.h into the shared header directory so that it can be
used by other modules within the AFS build. Note that we can't actually
install this header onto the system (and it cannot be included by
headers which are installed) because it uses autoconf defines to control
its behaviour.

Change-Id: If543f998faa0608b4f7efab90db31f072f9e9981
Reviewed-on: http://gerrit.openafs.org/3579
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-22 11:42:25 -08:00
Derrick Brashear
c845670469 LWP: kill dead code
the pthreads-wrapper LWP doesn't currently compile. it will need
to be revisited if we ever care. remove it (as well as a bit of other
unused code)

Change-Id: I61e7bc493127ec49347ca02b24db8fa79e4cbb28
Reviewed-on: http://gerrit.openafs.org/3564
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-21 21:09:24 -08:00
Derrick Brashear
5d218831f3 LWP: don't copy pid to a null pointer
In LWP_CreateProcess we take a pid. if it's null, don't crash.

Change-Id: I2a491788f5ce23a094e65192164838d5bbfc4b31
Reviewed-on: http://gerrit.openafs.org/3556
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-21 21:08:24 -08:00
Andrew Deason
fa4b1f3aeb LINUX: Avoid unnecessary afs_ShakeLooseVCaches
Before some of the NewVCache refactoring, we only called
afs_ShakeLooseVCaches when afs_vcount was over (or equal to)
afs_maxvcount. Do this again, so we only try to shake loose vcaches
when we need more vcaches. Otherwise, we will call
afs_ShakeLooseVCaches every single time we want a new vcache when
dynamic vcaches are disabled (such as 2.4 Linux), and we log a warning
when we can't free any (which is likely when there are only 1 or 2
vcaches in use).

FIXES 128756

Change-Id: Ia06f76a6f719e69881b91fb2d975cfc33c85c370
Reviewed-on: http://gerrit.openafs.org/3569
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-21 21:07:57 -08:00
Andrew Deason
2ce159fbf4 LINUX: Reduce stack depth on recursive symlink res
Instead of calling vfs_follow_link inside afs_linux_follow_link
ourselves, we can just resolve the next step of the symlink resolution
and set the result in nd_set_link(), freeing the string in
.put_link().

For kernels without a usable symlink text cache, this reduces call
depth when resolving a path containing many symlinks by two frames per
layer of indirection, allowing for more deeply-nested symlink paths to
be usable.

Change-Id: I6886c3b67089c8028fd6ad93ab10eb9173bd6fbe
Reviewed-on: http://gerrit.openafs.org/3433
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-21 21:02:15 -08:00
Andrew Deason
64e564b29e Cache bypass: remove ifdefs under src/afs/LINUX24
Same as commit 9657695d34, but for
LINUX24. Remove the AFS_CACHE_BYPASS references in LINUX24, since it
is always enabled. Also remove messages about a "cache bypass patched
module".

Change-Id: I79526ed78752a4c3da7123e5af1c5eb6afc19fe3
Reviewed-on: http://gerrit.openafs.org/3568
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-21 08:44:15 -08:00