Fix ifdef typo. The compiler complains that the variable
is undefined. Not sure what effect this may have had on
the intended preprocessor output.
Change-Id: Idef3f4ac42a96a096be25d31ff416f7a23560d70
Reviewed-on: http://gerrit.openafs.org/1635
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Only define __USE_XOPEN if not already defined.
In this part of the code it might now already be defined since
we enabled AC_USE_SYSTEM_EXTENSIONS.
Change-Id: I0651658d82550ee9be593d281bf50205815f9ef7
Reviewed-on: http://gerrit.openafs.org/1634
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Mode bits aren't directly exposed by the Win32 API. We were leaving
them to default to 0777 when creating new files and directories.
This patch introduces two configuration parameters;
'UnixModeFileDefault' and 'UnixModeDirDefault' which are DWORD
registry entries that are used to set the initial mode bits.
If the values are set to 0, then the behavior is identical to what we
had before.
Change-Id: I7822141aab1e12cc8e151be771f779284fa68465
Reviewed-on: http://gerrit.openafs.org/1602
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
right now, the discon lock never happens over a remove.
fix that. restructure the code to allow one unlock and exit.
Change-Id: I88fefa30c9ba8ad4a4ccce1a5b02e9fb8403b99d
Reviewed-on: http://gerrit.openafs.org/1629
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
- In Preference pane has been added a tab called "Option" where are
showned the option for kerberos renew
- In AfsBackgrounder has been implemented the NSTimer that will call
the krb5 renew action according to user preference value
Change-Id: Ica4b705018722488613ac09586e60c69303d1076
Change-Id: I79ce1334d99f926544e865fbb563a1ffecaa969c
Reviewed-on: http://gerrit.openafs.org/1606
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
this is also now unused. kill it.
Change-Id: Ie2f3edef4dc74ee874eb5aedaf2c0d2ee548ae6d
Reviewed-on: http://gerrit.openafs.org/1631
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
BreakVolumeCallBacks was a dead function that was removed from viced.
Remove the prototype for it.
Change-Id: I12a4d69719163d3e7be7dcae6f39df17b245c807
Reviewed-on: http://gerrit.openafs.org/1628
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
'vos syncvldb -verbose' outputs the before/after VLDB entries for
altered entries, but the 'after' output shows server addresses in NBO.
EnumerateEntry expects server IPs to be in NBO, so correct one location
where they were passed in HBO.
Change-Id: I332fe83b45b2b595e091c8eb9bdc57d89d5e36a8
Reviewed-on: http://gerrit.openafs.org/1550
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The option was given correctly in SYNOPSIS but not in the OPTIONS section.
Thanks, Rod Widdowson.
FIXES 126771
Change-Id: Ibd9694c066b6750ad04273c22e66c84fb7b4a1c6
Reviewed-on: http://gerrit.openafs.org/1589
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
turns out this VerifyVCache can end up hitting other lockers. move it out
of the try path.
Change-Id: I073318a44b4da519413905b677fd439f1edd6c54
Reviewed-on: http://gerrit.openafs.org/1547
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
this is no longer used. trash it.
Change-Id: I0ad5aa203924c6a16afd68bc8ef55663951917c3
Reviewed-on: http://gerrit.openafs.org/1315
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
vsproc's method of longjmp'ing out of a signal handler can thoroughly
confuse LWP. At the very least, the information on our stack becomes
incorrect, since we're no longer using the stack supplied by LWP. At the
very least, we seem to (almost) always fail the sanity check checking
for stack overflow. To prevent the test from happening, NULL the stack
pointer before the longjmp so we can attempt recovery.
FIXES 33360
Change-Id: Ie910cb1cc8564ac119c3b751fd8295bf312a3ce7
Reviewed-on: http://gerrit.openafs.org/1559
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
When vsprocs tries to longjmp from the signal handler, use IOMGR_SoftSig
first, so sleeping processes are woken back up. Without this, IOMGR can
bail out since it finds no processes READY when we attempt to do
anything with RX.
Change-Id: I9089bc4d003786d4a2205cd97f722fbf85fd1aa8
Reviewed-on: http://gerrit.openafs.org/1558
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
vsprocs tries to do error recovery by calling longjmp from a signal
handler. Although this is quite error-prone since we call a ton of
non-async-signal-safe functions, make it a bit more likely to work by
marking variables that are used after the longjmp as volatile. This
reduces how often (depending on the platform) these values will be
completely worthless after a longjmp since they were cached in a
register or similar.
FIXES 125535
Change-Id: I8566f8cffde6cfdffd99a11d637645494e0a0514
Reviewed-on: http://gerrit.openafs.org/1557
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Create a new CFLAGS_NOSTRICT Autoconf substitution variable which
is set to -fno-strict-aliasing if we're using gcc to compile. Add
@CFLAGS_NOSTRICT@ to the C compiler flags for source files that have
significant strict-aliasing issues.
Fix minor strict-aliasing issues elsewhere in the tree by using memcpy
to copy the data into a properly typed variable.
Change-Id: I43afdb5e33e06cb249b7db385a65daf8d2133a19
Reviewed-on: http://gerrit.openafs.org/1617
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Instead of defining various symbols like _XOPEN_SOURCE, _BSD_SOURCE, and
the like, just use autoconf's AC_USE_SYSTEM_EXTENSIONS to define all of
the appropriate symbols for us. Deal with some fallout by removing some
of the existing defines.
Change-Id: I1c1968c89cc2dfda1293fd2566dac8e266325a72
Reviewed-on: http://gerrit.openafs.org/1582
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
set an error usefully and drop the vfs lock
Change-Id: I9d901b50722c09e1b131077f0b19e2831e6a44c8
Reviewed-on: http://gerrit.openafs.org/1590
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
We currently attempt to align our XDR implementation with what may
be provided by the host system. This leads to a huge amount of parameter
fudging, and general pain and misfortune. However, the only place that
we still actually use the system XDR is for UKERNEL builds.
Change this so that we use our XDR everywhere. Fix all of our type and
function definitions so that they're standard. Remove the warning
inhibitions.
Change-Id: I53f4539e50eacb4e0691d8d3d6546bbfb7438358
Reviewed-on: http://gerrit.openafs.org/1340
Reviewed-by: Chaz Chandler
Tested-by: Chaz Chandler
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Rather than using an arbitrary array memset to ones as our signal
mask, use the POSIX sigfillset function and eliminate the static
variable. Fixes strict aliasing errors with --enable-checking and
gcc 4.4.3 on Linux x86.
Change-Id: Ic3e0499d03657d94f60808ed12e090dc62cce6fc
Reviewed-on: http://gerrit.openafs.org/1616
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The non-executable stack annotation used for Linux works by adding
an additional section to the generated object. The annotation added
in 9bfd03d723a9cf17673f40513a7adde1d503bcbc was added to the beginning
of each assembly file. This caused build failures on Linux s390
because the remainder of the assembly code was then put in that
section, which was discarded during linking.
Add the annotation to the end of each assembly file instead, following
the instructions at:
http://www.gentoo.org/proj/en/hardened/gnu-stack.xml
Change-Id: I5bd2d8d0ac31932b59757dcec0a942c459d61cac
Reviewed-on: http://gerrit.openafs.org/1615
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
to deal with refcounts, we have to mark hosts in a way other than holds.
do so. all other h_Enum callers don't use this feature.
FIXES 126497
Change-Id: I0fc008495b93d2c361d476c7fcb6b355c0dab825
Change-Id: I61128261b2e8c64fafbf7425d6a65dd48fd7e177
Reviewed-on: http://gerrit.openafs.org/1599
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
root vnode creation change caused a new warning i missed. fix it now,
set rootvnode to NULL
Change-Id: I06fe7a60f2fcc48c498249142220f65291188baa
Reviewed-on: http://gerrit.openafs.org/1610
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
add an entry to the aix vfs table so umount works
Change-Id: I29a27ca350b948da0283ae09df0acd30eb6384c4
Reviewed-on: http://gerrit.openafs.org/1611
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
When we are salvaging with ORPH_ATTACH, orphans are normally attached to
a volume's root directory. If the volume is missing a root directory,
however, nothing is attached, and the volume can appear empty or
unusable.
So, to make it possible to get a useful volume out of a volume that lost
(only) its root directory, create a new root dir, and attach orphans to
that root.
FIXES 94658
Change-Id: I946a60485b5793952707f44ac369ee243e8dc076
Reviewed-on: http://gerrit.openafs.org/1235
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
previously, we checked for (!held && !h_OtherHolds_r(host))
now, we want to confirm only we hold it, so comment that that's how
this works
Change-Id: I98a65fbb4f2d0532054c71699dc2168e4592668b
Reviewed-on: http://gerrit.openafs.org/1598
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
aix does need a prototype for the lame version of the function
Change-Id: I636b734bb725c425b2b4c6e4ae3e9473e087c21d
Reviewed-on: http://gerrit.openafs.org/1608
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
AFS PAM modules can call setpag() as root, regardless of the UID
being authenticated. This leads to the session keyring being created
using roots quota - on some systems (RHEL5) this quota is both small,
and of a fixed size.
Modify our keyring allocation code so that when a keyring is created
by root, we don't do any quota checks.
Change-Id: I2ee151ec1166a78475047bffd2c1d31f45e8dbdf
Reported-by: Rainer Toebbicke <rtb@pclella.cern.ch>
Reviewed-on: http://gerrit.openafs.org/1577
Tested-by: Rainer Toebbicke <rtb@pclella.cern.ch>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
add support for faking it. no exported interface exists, sadly.
currently does only authentication events, and is best-effort only,
however for people who get tokens after viewing directories in finder,
this is a drastic improvement.
also adds needed setting to afssettings plist
FIXES 23781
Change-Id: I46d5a6cf103c30a2134decccc929e1ef85a26726
Reviewed-on: http://gerrit.openafs.org/451
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
util_AdminErrorCodeTranslate() is used to translate error
code messages within the libadmin library set and is used
by translate_et. This has in the past not translated
krb5 error codes.
This patchset conditionally adds support for using
krb5_get_error_message() or error_message() on the Windows
platform if KFW is installed. This is accomplished by
adding new functions to afsutil.lib:
initialize_krb5()
fetch_krb5_error_message()
which are used within util_AdminErrorCodeTranslate()
only if AFS_KRB5_ERROR_ENV is defined.
Support for Unix is not provided at the present time
because doing this "right" will lead to a dependence on
kerberos libraries from this library, which we might want
to avoid.
Change-Id: I7caf7b8e41cfd806f4defc175aa45afb165ec244
Reviewed-on: http://gerrit.openafs.org/1531
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
src/vol/volume_inline.h does not need sys/file.h; at one point, it was
using macros from sys/file.h for locking constants, but now we use the
lwp/lock.h constants. So, include that instead. Also, only include it
for DAFS, since we only use the constants in the DAFS case. Thanks,
Jeffrey Altman.
Change-Id: I114b438d7fb1fbb3a35bdfa0717ac334c7f80355
Reviewed-on: http://gerrit.openafs.org/1596
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
make the uninstaller cope with the new receipts format and location
FIXES 125634
Change-Id: I6cf0cd3e979a34115f391477657ec37f0c3d8faa
Reviewed-on: http://gerrit.openafs.org/1593
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
VLockPartition sets VOL_LOCK, opens (perhaps creating) the lock file
for a partition, and flock's it. VUnlockPartition, sets VOL_LOCK, and
closes the lock file fd.
VLockPartition is called from the salvager. Nothing ever calls
VUnlockPartition.
VPFullUnlock is called every 30 seconds, does NOT set VOL_LOCK, and
happily closes any lock file fd it finds, breaking any lock set with
flock.
Other routines use the VOL_LOCK when traversing DiskPartitionList.
Change-Id: I683547f574b1f760e72014f5d44ce3987f07b5df
Reviewed-on: http://gerrit.openafs.org/1213
Reviewed-by: Dan Hyde <drh@umich.edu>
Tested-by: Dan Hyde <drh@umich.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
FreeBSD SVN rev 191990 removed the thread argument to
filesystem-dependent VFS calls. Curthread is always assumed.
There is a __FreeBSD_version bump that we could check if
we felt like being precise, but FBSD80_ENV is probably good enough.
Change-Id: I4534f01999b61eaeaa014c41473c693e6d432fef
Reviewed-on: http://gerrit.openafs.org/1587
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
if we bomb out with EFBIG, we must regain the GLOCK before returing
Change-Id: I3aec92f90abd665d86dcf413dad0e9cbb251a0af
Reviewed-on: http://gerrit.openafs.org/1584
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
replace both
afssettings with something patterned from webdav's (BSD-licensed)
mount program with general plist reading code. the lists of
valid oid objects of course have to be the same. eject old
darwins. add the new one.
fstab with something from freebsd umount
Change-Id: I28f6765475314b9b78102c762daec19cda4988c3
Reviewed-on: http://gerrit.openafs.org/1583
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
In DAFS, replace uses of the VLockPartition_r partition-level locks with
the approprivate VLockVolume*NB volume-level locks (and sometimes
FSYNC_VerifyCheckout). This allows for greater parallelization of
volserver attachment / volume creation, for volume operations to occur
during salvages, and for multiple salvages on a single partition to
occur simultaneously.
More architectural details of volume-level locks can be found in the
changes to doc/arch/dafs-overview.txt.
Change-Id: I4e8ef4c864002d7e7c976691824c53dfa9cfaf91
Reviewed-on: http://gerrit.openafs.org/1406
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This adds the necessary APIs and associated changes to lock (on disk) an
individual volume on a particular partition. Nothing yet calls these new
functions.
Change-Id: Ibfa00293e7411f3f48eabdecb13b7e80e126a1ff
Reviewed-on: http://gerrit.openafs.org/1405
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
When running with memcache, the filesystem cache is not initialized,
so the file-local struct vnode *volumeVnode is never set to non-NULL.
However, shutdown_cache() unconditionally calls vrele(volumeVnode),
which triggers a KASSERT that the argument to vrele() is non-NULL.
For certain kernel configurations, this results in a panic.
Change this so that vrele() is only conditionally called if the
volumeVnode is non-NULL.
Change-Id: I80235f0d45ae11f26e9a09854bb34439f89bbb40
Reviewed-on: http://gerrit.openafs.org/1576
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Actually get memory for the event mutex. With this and a locking
tweak, afsd actually starts (with memcache; the UFS cache still
has some locking issues).
Note that struct mtx is small enough that we may want to just
include it inline in afs_event_t and avoid having to do a separate
allocation/free step. However, Derrick wants to merge the FBSD and
DARWIN versions of this file, so stick with the more compatible
version for now.
I find that without the memset(), mtx_init() will (sometimes?) complain
that the mutex is already initialized. The glock should ensure
serialization here, though, so that we only allocate and initialize
one mutex per event.
Also remove an unnecessary cast while here.
Change-Id: Ib304f4301a478a82f0fb8c9ae3bfee98a2a28acd
Reviewed-on: http://gerrit.openafs.org/1560
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
hold a conn ref for the nat ping event. don't renew if the connection
is being garbage-collected.
Change-Id: I45ebf7b8d0362e409094666f186e6b4d58cc906a
Reviewed-on: http://gerrit.openafs.org/1573
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Add the growlagent Makefile to the list that gets cleaned with
the distclean target.
Change-Id: I6c3385f3b839c436efb50d0fc7239c181e027be6
Reviewed-on: http://gerrit.openafs.org/1575
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
afs_MarinerLogFetch(), a void routine, attempts to return a value.
While gcc (amongst others) merely issues a warning about this, the
Sun Studio C compiler gets cranky (at least on x86) and treats it as
a hard error, thereby aborting the build. Since there actually is no
value to return, this update simply removes the attempt.
Change-Id: Ic89fb05380a25a433f9c3b9fa57962f215348d95
Reviewed-on: http://gerrit.openafs.org/1574
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
use the same system for event mutexes macos does. this time for sure.
Change-Id: I18be653607490ba42f40a0b069460ece2f6ab416
Change-Id: I7e0a2f6042ef7f31612072c6625579de42b17f9b
Reviewed-on: http://gerrit.openafs.org/1554
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The vlserver has a function 'rxinfo' used for printing out information
about an RX call for logging purposes, which used a static string.
Change it to use a caller-passed buffer, so it is safe to use in
multiple threads.
Change-Id: I186010792e743bc9676ddd5b4c99f011b64988e6
Reviewed-on: http://gerrit.openafs.org/1545
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Dan Hyde <drh@umich.edu>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
when looking up the "real" cell name, avoid leaking memory. the strdup
is inside a loop and would leak memory for each host returned above one.
Change-Id: I36cc9bd27ddc831121f47046daaab11f752012fe
Reviewed-on: http://gerrit.openafs.org/1538
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>