Though it's very unlikely that someone would actually want to
set up a new kaserver installation, if we have documentation for
it, it ought to at least do what it claims to do.
Thus, change kinit to klog where it was intended.
Reported by Karl-Philipp Richter.
FIXES 133043
Change-Id: I478a42931fa863c11b4acca7624bcabc14e561b1
Reviewed-on: https://gerrit.openafs.org/12286
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Changes to salvageserver logging in commit
24fed351fd13b38bfaf9f278c914a47782dbf670
introduced a new bug in SalvageLogCleanup; the test for calloc() failure
was inadvertently inverted.
Fix the sense of the test.
Change-Id: Id0ee4ac3e60d7285163a9ab0b32bd7d48e570ac0
Reviewed-on: https://gerrit.openafs.org/12284
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
A typo in the recent logging changes for salvageserver
ad455347bc99d1bd499535995958b5f77c2388ff
caused a bad address to be passed to memset.
Correctly memset the log options as intended.
Change-Id: Ifef46defcc6da56df4e58f8ed9029717a77c0b39
Reviewed-on: https://gerrit.openafs.org/12282
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
In uvote_Init, we set ubik_lastYesTime to the current time just a few
lines before. It is important to set ubik_lastYesTime to the current
time, since that prevents us from voting for anyone in an ubik
election for at least BIGTIME seconds.
If we clear ubik_lastYesTime to 0, that means restarting a ubik server
could cause it to immediately start voting for a different site than
it was voting for before it started. This violates one of the ubik
invariants; as mentioned in the comments in SVOTE_Beacon, we cannot
promise sync site support to more than one site within BIGTIME
seconds. So initializing ubik_lastYesTime to 0 could cause two
different sites to be voted sync site simultaneously, if our restart
caused a premature change in vote.
Change-Id: I410fbefa8d699aac1c900d1fdd4e355b87917ad7
Reviewed-on: https://gerrit.openafs.org/12279
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
Reviewed-by: Jeffrey Hutzelman <jhutz@cmu.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Add the ability to specify a range of addresses in both NetInfo and
NetRestrict.
Change-Id: Iecdcca8587aa2e6e7cd56cbbebb63eb41b5d6f40
Reviewed-on: https://gerrit.openafs.org/11313
Reviewed-by: Daria Phoebe Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
These functions are used, so they should be in the library's
export list.
Even though no one should be using kauth anymore.
Change-Id: I3ad936c5b898f38194a461c7147792e2fe6f36b2
Reviewed-on: https://gerrit.openafs.org/11139
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Now that support for linux 2.4 has been sunset, as of commit
ccf353ede6ef5cce7c562993d1bea0d20844bdb7, it is no longer necessary to
put conditional compilation checks around the linux wait-for-completion
functions, which were introduced sometime during the linux 2.4 series
and have been available since.
Also, remove the remnant LINUX_COMPLETION_H_EXISTS autoconf macro, which
was removed from use in commit ef8bd5a29b937a1211540aa60398ee966470a712.
Change-Id: Iea974236f73eef8c567a897d6a473254edf95379
Reviewed-on: https://gerrit.openafs.org/12278
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
The cell info setup was moved to the beginning of the startup sequence
and an unnecessary sleep commented out in the syscall in which the cell
info was set in commit 3fa5f389b2b7778cf0df5a506c91b427b147c4c2.
Clean up afs_call.c a bit by removing this commented out code.
Change-Id: I8ef0ddce4e1d327032b54ecebb48e9fdfe7767b4
Reviewed-on: https://gerrit.openafs.org/12277
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This AIX specific code block has been commented out since
openafs-ibm-1_0. The comments seem to indicate this was a networking
tweak specific to AIX, but the kernel variables involved were not
exported. Clean up afs_call.c by removing this dead code.
Change-Id: Ieb66573c410199d590bfcccf942dca28547ed1e0
Reviewed-on: https://gerrit.openafs.org/12276
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
The call to afs_vfs_mount() in afs_call.c was removed in commit
a5ab24af71efe6b80eb0f78d1979c5ab1d1e594d. Remove the remnant prototype
and the useless conditionals around it.
Change-Id: I032ab5971a6e18df203f799c3a6e4f683a66d726
Reviewed-on: https://gerrit.openafs.org/12275
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This feature of lwp is basically unused and inconsistently implemented.
Change-Id: Icf5c04b3bbd71af2c3d1b22dc4bfbe051952d80b
Reviewed-on: https://gerrit.openafs.org/11649
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Commit d075b0549d62e4a81b7543b9c2f5dac242074909 introduced
parent_vcache_dv() to get the data version from fakestat mount points.
.mkdir (essentially .create for directories) should use this when
updating ->d_time.
In sillyrename, __dp is a negative dentry that should be forced to
revalidate since the new name in dentry now exists.
Change-Id: I5b112ce0437bfb061479024fee745b46821e599c
Reviewed-on: https://gerrit.openafs.org/12141
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Previously, we would set -fno-strict-aliasing only when
--enable-checking was given to configure but not
--enable-checking=all. The intent seems to have been to
only warn about strict aliasing violations when --enable-checking=all
is in use, but that there was no need to disable the strict-aliasing
diagnostics when -Werror was not enabled.
Unfortunately, -fno-strict-aliasing affects not only the diagnostics
emitted by the compiler, but also the code generation! So we were
leaving the normal (no --enable-checking) case with the compiler
assuming C's strict aliasing rules. The OpenAFS codebase has
historically not been strict-aliasing safe (for example,
commit 15e8678661ec49f5eac3954defad84c06b3e0164 refers to a
runtime crash using a certain compiler version, which is diagnosed
as the compiler using the C strict aliasing rules to make
optimizations that exposed the invalid program code.
To avoid futher surprises due to new compiler optimizations
that utilize the C strict aliasing rules, always disable
strict aliasing except when --enable-checking=all is used.
Change-Id: Ib5d3bbd7c88686bd9a878b6b2c5e7c2b4eeccc04
Reviewed-on: https://gerrit.openafs.org/11988
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
An error code is returned by afs_ProcessOpCreate if
this function can not allocate memory for ttargetName.
This function should release the memory previously
allocated for tname and decrement the reference count
of tdp as well.
Change-Id: Ic771b1d57080df6ee562a7327762030afdd5b08c
Reviewed-on: https://gerrit.openafs.org/12208
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This file is only built on linux, for afspag.ko. There is no
need to retain the artifiacts of its historical origin that include
conditionals for SUN5 or HPUX or the like.
Change-Id: Icbb2390d261f2f51766b392968fe332c4fb8aa6c
Reviewed-on: https://gerrit.openafs.org/12134
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
In 1.4, a 'vos backup' command looked like this:
$ vos backup root.cell -verbose
Re-cloning backup volume 537351386 ... done
Created backup volume for root.cell
As of 1.6.1, this output now looks like this:
$ vos backup root.cell -verbose
Re-cloning backup volume 537351386 ... done
done
Created backup volume for root.cell
Note the extra " done". This change can break scripts that parse "vos"
output, but mainly it just looks confusing and doesn't make any sense.
This extra " done" appeared in verbose output for 'vos backup', 'vos
backupsys', and 'vos clone'. It was introduced by commit 13a4f2b1,
which added a VDONE to DoVolClone. This new VDONE call does make
sense, as this does make DoVolClone more self-contained, but the old
VDONE messages were not removed, so an extra " done" got printed.
In addition, commit 13a4f2b1 introduced a new call to DoVolDelete
followed by a VDONE, even though DoVolDelete calls VDONE itself,
causing another redundant " done".
To get rid of all of these redundant " done" messages, remove some
extra VDONE calls in UV_BackupVolume and UV_CloneVolume.
Almost all other calls to VDONE in vsprocs.c are matched by a
preceding message that says what we are doing. The sole exception is
UV_ChangeLocation, which outputs a " done" without any preceding
message. However, this is the behavior that UV_ChangeLocation (and
thus 'vos changeloc') has always has since it was introduced in
0c03f860.
Thanks to Jakub Moscicki of CERN, who originally reported this issue
at EAKC 2014.
Change-Id: I6a13c85e73deb59b511086207a296f4017f799dc
Reviewed-on: https://gerrit.openafs.org/10980
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Commit ec706b21530240d7fb66bad2f08513eff8f7c335 removed support
for Linux 2.4 and legacy kernel modules, but missed a few more
occurances of the latter. Remove those too.
Change-Id: I449f0303ec916d597f65790c6f6a564d2f58ce48
Reviewed-on: https://gerrit.openafs.org/11866
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
The deployed documentation on docs.openafs.org uses html file names
that match the id element for the XML elements in question. On
recent Debian systems, rebuilding these documents uses different
names for the files, based on their position within the document
hierarchy.
For consistency with past usage, and to avoid breaking direct links
when possible, set the xsl parameter use.id.as.filename to go back
to the old naming scheme.
Change-Id: I6d3fa2b74e319d1375891170817760d027e82f03
Reviewed-on: https://gerrit.openafs.org/12189
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Bring these two files back into synchronization. Fix
possible bug on very old SysV hosts where volume
header file extension could be handled inconsistently.
Overall differences reduced by about 50%. HPUX/AIX
differences now correctly managed in both versions.
Comment formats and whitespace in both modified to
remove differences and follow openafs standards.
Change-Id: I8fdf9941a0ee6ad7a091be38740bc2796f2b1d18
Reviewed-on: https://gerrit.openafs.org/5405
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
In order to avoid surprises due to operator precedence, the bodies
of macros that are intended to be used as values should always
be enclosed in an outer set of parentheses, if they contain more than
one term.
Change-Id: If175b1977b9452a7507c5906e4e611eccafb4d67
Reviewed-on: https://gerrit.openafs.org/12143
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tell git to ignore the new akeyconvert binary added in commit
6f4bdc8cb3cd020cf4b499c352ec4c4811b5a267.
Change-Id: I4b9473e455319ac8ec378169a911c0619ab1fced
Reviewed-on: https://gerrit.openafs.org/12263
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
We will want to create a krb5_principal object that is used
as a sigil for comparison against, and need to do so in a portable
fashion. krb5_parse_name and krb5_unparse_name have been around
for a long time, but the counterpart krb5_free_unparsed_name is
not always available, so provide compatibility for it.
krb5_free_keytab_entry_contents is only a symbol in MIT krb5;
we will need a compat macro on Heimdal systems where it is not present.
Change-Id: I1cfe12910adac39216b8c7dd337b7e22d73555ed
Reviewed-on: https://gerrit.openafs.org/11785
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
A simple utility to help with the 1.6-->1.8 upgrade by
bulk-converting keys, with some sanity checking.
Change-Id: Ibae9a1ea3b7c3bbad5ffbc02410fa7a4ff6c4d7f
Reviewed-on: https://gerrit.openafs.org/11786
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
libroken provides roken/rename.c for platforms where the native rename()
implementation does not replace the target if it already exists. As designed,
rk_rename() should be used instead of rename() everywhere and rk_rename()
is #defined to be rename() on platforms where this fix is not necessary.
Do not include the rk_rename() implementation on platforms which do not need
the rk_rename since it is not used on those platforms.
Note: This fix also avoids a recursive rename(). As currently implemented, the
rk_rename() function is redefined to rename() within the roken/rename.c module
when RENAME_DOES_NOT_UNLINK is not defined. This can mask the standard library
rename() and leads to a recursive call to rename().
Change-Id: I47a1fcd21939b161aaa7df7ffab26dc84e7b75ed
Reviewed-on: https://gerrit.openafs.org/12091
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Do not create new server log files when servers are restarted by
default. External log rotation tools may be used to rotate the logs by
renaming log files and then signaling server processes to reopen
log files.
Add the -transarc-logs option to each server to provide backward
compatibility with the traditional Transarc-style logging. When
-transarc-logs is given, log files are renamed to an ".old" file
(overwriting the existing ".old" file) and the previous the log file is
truncated.
Change-Id: I2eeb67e3db32b2f75fe685b68dab1159e62061e9
Reviewed-on: https://gerrit.openafs.org/11731
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Claim the SIGUSR1 signal for reopening server log files. A server
process will reopen the log file when the SIGUSR1 signal is received.
If the log file does not exist, the server process will create a new,
empty log file.
This allows external log rotation programs to rotate log files by
renaming an existing log file then sending a SIGUSR1 signal to the
corresponding server process. Any messages written to the log after the
log file was renamed but before the SIGUSR1 signal is received will
continue to be written to the renamed log file. The server process will
write messages to the new log file after handling the SIGUSR1 signal.
The SIGUSR1 signal is used to reopen the log file instead of the more
commonly used SIGHUP signal, since SIGHUP is already used for resetting
the logging level.
The retirement of Linux 2.4 support, in particular the desupport of
LinuxThreads, in commit ccf353ede6ef5cce7c562993d1bea0d20844bdb7 allows
for the use of SIGUSR1 in OpenAFS.
Change-Id: Ie3ff52ae4986eae30c7420b5f05ff1eacdfe7596
Reviewed-on: https://gerrit.openafs.org/11727
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Provide doxygen style comment blocks for the server logging functions
and module variables.
Change-Id: Iacb49ce5d221f9219290e2479df8fa9a54a88fa7
Reviewed-on: https://gerrit.openafs.org/12221
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Remove the global variables used to setup server logging and replace
with an argument to OpenLog.
Keep the LogLevel variable as a global for use by the logging macros,
but provide an inline function for applications which check the log
level to dump more information when the log level is increased.
Provide consistency by adding syslog tags to processes that did not
previously set one (salvageserver, salvager, and volserver).
[kaduk@mit.edu: update commit message, use old-style log rotation for
kalog, minor commenting fixes]
Change-Id: I11cffbdd1418304d33f0be02dd7e600955c4a8bb
Reviewed-on: https://gerrit.openafs.org/12168
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
The lock protects global state such as the logging FD and the
syslog-related variables.
Change-Id: I5ea1b6945c10047da14d35b948a6a0ea53b55add
Reviewed-on: https://gerrit.openafs.org/12123
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
The name of the log file passed to ReOpenLog() may not match the name
given in the initial OpenLog() call. This can happen when the -logfile
option is given to the fileserver or volume server.
Since the name given to ReOpenLog() must match the original name, change
ReOpenLog() to use the name previously given to OpenLog() and update all
callers.
Change-Id: Ie6fa4cb6e3c03f853efe0207bbec5d8412c6fe59
Reviewed-on: https://gerrit.openafs.org/11723
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reopen the log file even if the filename exists. This fixes the
situation where an external program moves or deletes the log
file, then creates a new file with the same log file name.
Change-Id: I3b98d6fc0d05c7ab231f84e9a271f925506ab51f
Reviewed-on: https://gerrit.openafs.org/11725
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Non-functional changes and cleanups in preparation for fixes and
enhancements.
Move the duplicated code to redirect the stdio/stderr streams to a common
static function. Add a helper function to check for named pipes. Move the
code to rename files when opening logs to a separate static function.
Change-Id: I5b56b80a7e799b6605cfad7b58ac8249ac93acc8
Reviewed-on: https://gerrit.openafs.org/11721
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
The MR-AFS-style logs would always include the thread number in
log entries with the timestamp; now that we are trying to rebrand
this feature as "timestampped logs", having this bonus feature
is unexpected.
Thread ids are still used at higher log levels, as enabled by SIGTSTP.
Change-Id: Ie8c276e47a34d729ccce685ddf27bfa9e7a8f9f1
Reviewed-on: https://gerrit.openafs.org/12136
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
When MR-AFS style logging is in effect, the SIGHUP signal handler will rename
then create a new, empty server log file to support log rotation.
Unfortunately, the old log file descriptor is not closed, so each SIGHUP
signal will leak one file descriptor.
Be sure to close the current log file descriptor before opening the log again.
The OpenLog() routine will move the current log file to a new file, with a
timestamp string appended to the log file, then open the server log file with
truncate flag to start a new log file.
Change-Id: Ic3f29607fa50ed868b9245865e375dedde438471
Reviewed-on: https://gerrit.openafs.org/11722
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Do not make timestamped log files with an invalid number of seconds when
renaming old mrsafs-style log files, i.e., more than 59 seconds in the
seconds field.
Replace the goto used in the mrafs-style make file name retries with a
regular, bounded loop.
Change-Id: I16d032197e4b1e227b1f005fbc395a013e099561
Reviewed-on: https://gerrit.openafs.org/12220
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Remove the unused printLocks variable, which was added in commit,
86f1dc2117e6b6c8abb55ccbc8621743969b8996 "mrafs-server-log-handling-20010212"
but never used.
Change-Id: I64459cf93e86352ef16d9526e46847cbb4997f10
Reviewed-on: https://gerrit.openafs.org/11719
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Allocate the ourName buffer to save the log filename during OpenLog(),
instead of trying to copy the log filename to a fixed size buffer.
Deallocate this buffer when the log is closed with CloseLog(). Save the
log file name even when MR-AFS style logging is not effect to allow
ReOpenLog() to use the saved filename in a later commit.
Dynamically allocate a buffer when formatting a file name for log
rotation instead of using a fixed size buffer on the stack. Allocate
the buffer for both traditional Transarc-style log file renaming
(appending ".old" to the log filename) and the MR-AFS style logging
(appending a timestamp to the log filename).
Change-Id: Ie217a93b271b48ccfc7b5244ad3a8c949d55ef54
Reviewed-on: https://gerrit.openafs.org/12219
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Commit b71a041364d28d6a56905a770cd20d1497ee26ec added the O_APPEND flag when
opening the log file to allow sites to use logrotate's "copy and truncate"
feature.
Add the O_APPEND to MR-AFS style logs as well so MR-AFS style logs can also be
handled correctly with logrotate, we have consistent open flags, and can remove
a duplicate call to open the log file descriptor.
Change-Id: I8370838e1e2c7ddaa042508d6b9cbe1299339f68
Reviewed-on: https://gerrit.openafs.org/12218
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Commit 8af5762909714367c1cc764b3f491c06c2bcd5d0 "Clean up some
obsolete Autoconf code" removed the obsolete autoconf check
AC_FUNC_SETVBUF_REVERSED and one use of the results, but
overlooked another instance; remove it.
Change-Id: Id62a2a96b911c0d16d51d8cce0966ae3736bde87
Reviewed-on: https://gerrit.openafs.org/11718
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Be sure to always initialize the server log mutex. Use pthread_once to
ensure the mutex is initialized only once.
Before this change the server log mutex was not properly initialized
with pthread_mutex_init when logging to the syslog.
Change-Id: Ief2ee6b373f7309bc05061f7413b6ff623b86e31
Reviewed-on: https://gerrit.openafs.org/11717
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Do not assume the server log file descriptor cannot be zero.
Thanks to Chas Williams for spotting this bug.
Change-Id: I0d264828926bf8cd765b45db4e529233b8686404
Reviewed-on: https://gerrit.openafs.org/11797
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Remove the old util/softsig implementation, which has been replaced by
opr/softsig.
Change-Id: Ie32f04129dd0b09a8baf9f6739abf53fbf1b98eb
Reviewed-on: https://gerrit.openafs.org/11998
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Convert the ptserver from regular signal handling to the opr soft
signal handling when built with pthreads. This makes it safe to call
pthread functions within signal handlers.
Change-Id: I43d345517c75e275d6896154a979a908181a1f39
Reviewed-on: https://gerrit.openafs.org/11997
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Convert the vlserver from regular signal handling to the opr soft
signal handling when built with pthreads. This makes it safe to call
pthread functions within signal handlers.
Change-Id: Ic9bd841c4796bd64b603505541da7e767afda83e
Reviewed-on: https://gerrit.openafs.org/11996
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Convert the volume server from regular signal handling to the opr soft
signal handling when built with pthreads. This makes it safe to call
pthread functions within signal handlers.
Change-Id: I25b9a9184c526f4ce9b6e2abb25ae9135cc97ec6
Reviewed-on: https://gerrit.openafs.org/11995
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Convert the fileserver from the obsolete softsig routines to the modern opr
softsig routines for pthreaded programs.
Change-Id: I9e98e402f73ebca05fcaf0f852055b9a5ad93632
Reviewed-on: https://gerrit.openafs.org/11994
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Remove remnants of old lwp thread signal handler wrapper functions from
the fileserver. The lwp softsig handlers required a function which was
passed a void pointer argument and returned a void pointer. Tidy the
code by removing the unneeded wrappers and use the signal handler
functions directly.
Change-Id: I3d52efe659b03ee9a9484ec7a9d74404f1970278
Reviewed-on: https://gerrit.openafs.org/11921
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>