Commit Graph

8267 Commits

Author SHA1 Message Date
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
Derrick Brashear
468ff8e4d2 DARWIN: replace resource merge script ref with binary
Ro is a helper tool; use Rez directly

Change-Id: I7b3f8105344960a149d7fa0ee1fbb3a332486a04
Reviewed-on: http://gerrit.openafs.org/3565
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-21 06:19:17 -08:00
Derrick Brashear
0ef3ce2006 DARWIN: make growlagent build not run afoul of ._ fun
in some cases a git checkout would promptly merge the ._ file away,
meaning a subsequent build would fail. just use the developer tools
to set an icon instead of clever tricks.

Change-Id: I34290f0f32cb7ae72a298a7af1ed4bd6a8ef9224
Reviewed-on: http://gerrit.openafs.org/3563
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-21 06:11:19 -08:00
Derrick Brashear
9de81541aa DARWIN: make ARCHFLAGS propagate to shlibs
in order that configure not expand ARCHFLAGS (so we can override from
shell) escape the variable.

Change-Id: I9d5c3f4cc58c66be7ffefbd134ba476673be6ea8
Reviewed-on: http://gerrit.openafs.org/3562
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-21 06:02:55 -08:00
Ben Kaduk
b1cb3607ff FBSD7: Don't sleep with the glock
On FreeBSD 7.X, vinvalbuf() can (will) sleep; this results in a panic
when the kernel is configured with WITNESS and we hold the glock around
it.
Drop the glock in this case.

Change-Id: I0036aad3059805d77afe9aa9bf7f5d421d6810f8
Reviewed-on: http://gerrit.openafs.org/3551
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-20 13:44:11 -08:00
Ben Kaduk
6040a4daa0 Bring FBSD 7.X client back to life
Having been untested for quite some time, we had several
places that needed more conditionals to compile on FreeBSD 7.

Now we compile and start on 7.3-RELEASE, but have locking issues
under actual use.

It seems that we are also incompatible with the Heimdal 0.6.3 in
the base system -- aklog is unable to actually obtain the needed
credential when compiled against that kerberos implementation;
using MIT krb5 1.6.3 from ports works without incident.

FIXES 128612

Change-Id: I831cea711067d04dc276deb171faf3369c55b775
Reviewed-on: http://gerrit.openafs.org/3548
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-20 13:43:22 -08:00
Ben Kaduk
28032bc1c1 FBSD: StopListener glocking fixup
afs_osi_Sleep requires the glock (so that it can sleep on it); we
dropped the glock earlier in osi_StopListener because soshutdown and
soclose can sleep, but we must (unconditionally!) acquire it for our
loop waiting on rxk_ListenerPid.

Change-Id: I38c3ab6689a6af7f1693bd3c8348068ee280e530
Reviewed-on: http://gerrit.openafs.org/3549
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2010-12-20 13:43:09 -08:00
Andrew Deason
ad0b390ec5 LINUX24: Define afs_linux_can_bypass
We call afs_linux_can_bypass, so make sure it exists.

Change-Id: Ie4393cc57af1a52748b76d3403370fbd788d9f8a
Reviewed-on: http://gerrit.openafs.org/3554
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-20 13:41:27 -08:00
Andrew Deason
6f65ace58d LINUX24: Include linux/pagemap.h
For 2.4 Linux we need to include linux/pagemap.h, otherwise we get
undeclared references to KM_USER0 and PAGE_CACHE_SIZE.

Change-Id: I1bd6c6484a9b46f923fa31d1d45fbfedc243abbd
Reviewed-on: http://gerrit.openafs.org/3553
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-20 13:40:27 -08:00
Derrick Brashear
4f89d4ad34 backup: pass in valid dummy pid for LWP
LWP_CreateProcess needs memory passed in; instead of a null pointer,
pass in a pointer to a PROCESS.

Change-Id: I451d803461252e3afb5d89b840a1ee047228d204
Reviewed-on: http://gerrit.openafs.org/3555
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-20 13:39:59 -08:00
Ben Kaduk
37c20528df Zero rx_multi_lock before initializing it
FreeBSD's kernel debugging facilities will panic if it detects
an attempt to re-initialize an already-initialized lock, as detected
through some particular bits being nonzero.  Zero everything out
before starting, to prevent this panic.

Change-Id: I7f3abae978d1cbe7eb4908d90c52a0dc46b81e08
Reviewed-on: http://gerrit.openafs.org/3550
Tested-by: BuildBot <buildbot@rampaginggeek.com>
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>
2010-12-20 08:56:23 -08:00
Jeffrey Altman
afef1712f2 Windows: fs chmod and display mode in fs examine
Make use of the new pioctl VIOC_GETUNIXMODE and VIOC_SETUNIXMODE
operations to display the current mode in fs examine and permit
setting the mode with "fs chmod".   The mode string parsing makes
use of Vincent Archer's code from Minix.  The required copyright
statement and license is attached to parsemode().

afsconfig-windows.h gains definitions for various mode symbols
that are not defined by Visual Studio runtime headers.

Change-Id: I624f73154b7f177f93289e2641da5d9478ea931c
Reviewed-on: http://gerrit.openafs.org/3546
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-20 08:06:39 -08:00
Jeffrey Altman
bb4c0234b2 Windows: clear mountPointStringp on status change
If the data version of the cm_scache_t changes, we must clear
the mountPointString.  Otherwise, if the object is a mountpoint
or symlink, cm_HandleLink() will not attempt to build the new
target string.   The Windows CM never updates the contents of
a mountpoint or symlink.  It always destroys the old and creates
a new one.  However, the Unix CM simply updates the link data.
Apparently, the Windows clients have never noticed.

Change-Id: If2297ed0a323411df13b7828d11dbb653669d351
Reviewed-on: http://gerrit.openafs.org/3552
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-20 08:06:10 -08:00
Jeffrey Altman
27469e59b1 Windows: Add VIOC_GETUNIXMODE and VIOC_SETUNIXMODE
Add pioctls to get and set the UNIX mode bits for an
object in AFS.

Change-Id: I220047d8be50b5db511e41004b8248859f479c0c
Reviewed-on: http://gerrit.openafs.org/3545
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-20 07:08:53 -08:00
Jeffrey Altman
16dac6d4a6 Fix fallback processing for ktc_GetTokenEx()
The fallback processing after ktc_GetToken() generates
a token set or fails.  Immediately return 'code' to the
caller after freeing ktcToken.

Change-Id: If82c5c94b75152eaa4d077b428238e8f77478d05
Reviewed-on: http://gerrit.openafs.org/3544
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-18 17:54:02 -08:00
Derrick Brashear
f32a0df37b darwin: fix fixed setpag error handling
looks like testing 9da7f3cc73
failed to have the right dependencies. fixing the fix!

Change-Id: Ib295e819667c895bfe52c4d5b217ebbeaf1e4c52
Reviewed-on: http://gerrit.openafs.org/3542
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-17 18:20:01 -08:00
Derrick Brashear
98c6aadfa1 macos nfs translator vnode ref fix
code won't trigger today but we might as well get it right.
we already ref the vnode. don't leak refs.

Change-Id: Ib2aa87ffbb8c6bbd38d8858328d26f1a37cf04b9
Reviewed-on: http://gerrit.openafs.org/3532
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-16 09:15:03 -08:00
Anders Kaseorg
1519144f83 Linux: Fix AFS_NORETURN violation with osi_AssertFailK
Commit d86f0c44d3 changed the
AFS_LINUX26_ENV implementation of osi_AssertFailK so that it returns,
contradicting its AFS_NORETURN prototype, in an effort to make the
following BUG() display the right line number.  To fix this, move the
returning implementation into its only caller, the osi_Assert macro.

This fixes possible compiler misoptimizations due to

rx_kcommon.c:255:1: warning: ‘noreturn’ function does return

Change-Id: Ibbcc630037002ce4659e2e6a36b39d271f9bdc58
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3276
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-13 15:53:01 -08:00
Simon Wilkinson
acfc61eca8 opr: Add new queue implementation
Add a new queue implementation for OpenAFS. This has a similar calling
form as the current RX queue implementation, but is implementated using
type safe functions, and supports structures with multiple queue
headers. This permits threading a structure onto multiple queues at the
same time.

The eventual intention is that this queue implementation will replace
both rx_queue and the Unix cache manager afs_q.

Change-Id: I8f815872b017a85eb52a6e6451cdcee3eb869519
Reviewed-on: http://gerrit.openafs.org/3139
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-13 11:32:51 -08:00
Derrick Brashear
e8d8a2240a refactor afs_CheckServers
basically, we need the ability to reuse this function, so, let's make it work
differently so we can.

Change-Id: I41a7e1dc62feeb137f1a7f5c939f54cb59cc6c13
Reviewed-on: http://gerrit.openafs.org/3403
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-13 11:25:32 -08:00
Andrew Deason
4e00fc6f0e Add ioctl-based AFS calls for Solaris 11
Switch from using syscall-based AFS calls to ioctl-based AFS calls,
since syscall 65 was repurposed in some kernels in Solaris 11 and
OpenSolaris. Update the provided afs init script to accomodate the
additional steps needing for starting the AFS client.

Partially based off of some work by Derrick Brashear.

Change-Id: If694af8ac576856fed113851f1be4154b4d970d3
Reviewed-on: http://gerrit.openafs.org/3498
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-13 11:12:58 -08:00
GCO Public CellServDB
8815f50991 CellServDB update 13 Dec 2010
Change-Id: Ic3c96d99656f50da82243385cb7f9bcdf78f12e4
Reviewed-on: http://gerrit.openafs.org/3503
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-13 08:06:09 -08:00
Jeffrey Altman
f8400699a8 Windows: log error code for smb lan thread fail
When creation of the smb_LanAdapterChangeThread fails
log the error code as part of the panic message.

Change-Id: Iac034bdf2f04aed08cf77702c701882c31a10b36
Reviewed-on: http://gerrit.openafs.org/3502
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-12-13 07:49:51 -08:00
Jeffrey Altman
6229ffb7ae Windows: PerformanceTuningInterval Merge error
Due to a merge error, if RankServerInterval was set via the
registry, its value would also be used for the
PerformanceTuningInterval.  Fix it.

Change-Id: I6605146db0c25ecbf0d20f9d7198934f5bf411ad
Reviewed-on: http://gerrit.openafs.org/3500
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-11 20:35:04 -08:00
Andrew Deason
2cd0a1e4ff Add afs init script for Solaris 11
Change-Id: I978454a5d34aee412ec3e3d57a38859b1405e5fb
Reviewed-on: http://gerrit.openafs.org/3499
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2010-12-10 15:06:14 -08:00