Move key-related warnings to common server code Each server process can log a couple of different warnings about the server keys found on disk: - If afsconf_GetLatestKey() returns success (indicating a single-DES key is present), we call LogDesWarning(). - If afsconf_CountKeys() returns 0 (indicating there are no keys at all on disk), we log a warning that all authenticated access will fail. Currently, the code to do these checks and log the relevant warning is duplicated across the startup code for nearly every server process. To avoid this duplication, and to make sure the checks aren't accidentally skipped for anyone, move these checks to afsconf_BuildServerSecurityObjects, which every server process calls. We must add an additional parameter to afsconf_BuildServerSecurityObjects to handle the different logging mechanism these servers use, but afsconf_BuildServerSecurityObjects is declared in a public header (cellconfig.h), and is exported in a public library (libafsauthent). So to avoid changing a public symbol, introduce a new variant of the function, called afsconf_BuildServerSecurityObjects_int. Declare this in a new internal header, authcon.h. We don't have easily-usable logging functions for upserver and butc, so just don't log the warnings for those. For ubik servers, don't update ubik_SetServerSecurityProcs to use the new function; the initial call to afsconf_BuildServerSecurityObjects_int in the server's startup code will cover logging the warning on startup. Change-Id: I5d5fceefdaf907f96db9f1c0d21ceb6957299a59 Reviewed-on: https://gerrit.openafs.org/10831 Tested-by: Andrew Deason <adeason@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
fsint: remove dead code The last references to these objects were removed with commit 3828c257ae33306bbdd3c6db9381601fe5b1b110 "dead-code-and-prototyes-20060214". A few mentions of CBS and BBS are left in the documentation as historical references: - doc/man-pages/pod1/rxgen.pod - src/kauth/AuthServer.mss Change-Id: Ia24eef7bb1509ff10d11de5c51e688e27f69417a Reviewed-on: https://gerrit.openafs.org/13324 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Build system: MT_LIBS includes XLIBS The MT_LIBS library list already includes XLIBS, so there's no need to specify both on a link line. Change-Id: I8594b1b6e1a16af741b40822cbce49e846b26f49 Reviewed-on: http://gerrit.openafs.org/8904 Reviewed-by: Daria Brashear <shadow@your-file-system.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
build: remove trailing whitespace from makefiles Remove trailing whitespace from the makefiles, except for trailing whitespace in the boilerplate comment headers. Change-Id: Ib8ee87a51f00633ba15e1974ac0b311969bef1bf Reviewed-on: http://gerrit.openafs.org/11456 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil> Reviewed-by: D Brashear <shadow@your-file-system.com> Tested-by: D Brashear <shadow@your-file-system.com>
Stop using libafsrpc Instead of using libafsrpc.a in the pthreaded server directories, use the libtool library variants instead. Change-Id: I4cdbaf5a060b3e5aa82fb0d79535cb4fdc850bcf Reviewed-on: http://gerrit.openafs.org/8074 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Don't explicitly build and link rx_pthread.o A number of pthreaded directories explicitly build, and link, with rx_pthread.o, in order to be able to send RX 'dpf' debugging messages to the server log, rather than to stderr. However, this direct linking causes build failures on some platforms, because we end up linking in a version of rx_pthread.o, twice and both versions contain identical linker symbols. As this functionality is only used for debugging, just get rid of the additional object. Change-Id: I6126891db2dcbc289f6a9f7b99c01d6af7a19089 Reviewed-on: http://gerrit.openafs.org/8071 Reviewed-by: Derrick Brashear <shadow@your-file-system.com> Tested-by: BuildBot <buildbot@rampaginggeek.com>
fsint: Move to using libtool Move the fsint directory over to building a libtool library (liboafs_fsint). Because libtool requires that libraries have no unresolved dependencies, we cannot include the server side stubs in the libtool library. Change-Id: Ia3f009680ac510f522b806366985e557cd6e4219 Reviewed-on: http://gerrit.openafs.org/8070 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
lwp: Build a pthreaded compat library with libtool The majority of the LWP directory isn't used by pthreaded applications. However, there are three files - fasttime.c, lock.c and waitkey.c which are used within pthreaded code. Eventually, these should live somewhere other than the LWP directory. For now, just build a small pthreaded library to hold them, so we can finish up with the libtool work before considering how to move this code elsewhere. Change-Id: I66281f7cd838c048fd982bbd0f756a16a10862d1 Reviewed-on: http://gerrit.openafs.org/8069 Reviewed-by: Derrick Brashear <shadow@your-file-system.com> Tested-by: BuildBot <buildbot@rampaginggeek.com>
util: Convert to using libtool Create a pthreaded version of libafsutil, named liboafs_util.la, and use this library in all of the pthreaded binaries that we build, replacing both inclusion of libafsutil.a, and direct compliation of pthreaded versions of the util source files. libafsutil.a is provided for legacy LWP applications, and the convenience library libafsutil_pic.a remains until we address the way in which the user space cache manager is built and linked. Change-Id: Ibdc3d6e2fe56ca6f5b882cf03991d1a2e32c62b2 Reviewed-on: http://gerrit.openafs.org/8056 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
cmd: Convert to using libtool Convert the libcmd and libcmd_pic libaries to being built using libtool. Historically, these have been built as LWP code, but they have no LWP dependencies, and no LWP-specific code within them. So, make cmd a pthread-only library. In addition to the libtool library liboafs_cmd.la, we build the legacy libcmd.a and libcmd_pic.a as convenience libraries. libcmd64.a (a 64bit variant, used solely by kdump), remains built through "normal" means. Update pthreaded users of libcmd to use the new liboafs_cmd.la. For now, non-pthreaded users are left alone. Change-Id: Id8445949754d1942f6e8752ae182b4e6f86fe94f Reviewed-on: http://gerrit.openafs.org/8055 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
opr: Convert to using libtool Convert opr so that it uses libtool. For backwards compatibility we still build libopr.a, but we do so as a static convenience library. As libopr.a may, in the future, be converted to an LWP library, change all of the pthreaded binaries so that they link against the libtool library liboafs_opr.la Change-Id: Icee04ff4745334f06ffba16df5bb07fc9dcc0b54 Reviewed-on: http://gerrit.openafs.org/8034 Reviewed-by: Derrick Brashear <shadow@dementix.org> Tested-by: Derrick Brashear <shadow@dementix.org>
auth: Relocate NetRestrict support functions Pull the NetRestrict and NetInfo support functions out of libutil, and into libauth. This starts to concentrate all of our configuration file parsing functions into the same place. It also gets rid of a circular dependency. NetRestrict parsing relies on functions from rx, so with this in libutil, we had the dependency chain util->rx->util Change-Id: I250d4d8264da8db61f603a06d1b7fdab44384cd3 Reviewed-on: http://gerrit.openafs.org/8027 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
viced: Remove the LWP fileserver *) Remove all LWP specific code from the fileserver, and make pthread the default *) Build the pthreaded fileserver in the 'viced' directory, rather than in tviced *) Move the DAFS specific files from tviced to viced (arguably, these should move into dviced, but there are currently no source files in that directory) *) Remove tviced from the build Change-Id: I6e186c9fad6d9dccd04cf1317a80c087587ef25f Reviewed-on: http://gerrit.openafs.org/5816 Reviewed-by: Derrick Brashear <shadow@dementix.org> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Clean up assertion The AFS code has multiple different assertion implementations in userspace. This patchset is the start of bringing some sanity to them. In rx, we have osi_Assert, a user/kernel assertion macro. This is only available to libraries which have RX dependencies In util, we redefine the standard 'assert()' macro to provide a cross-platform assertion solution. Because util has an RX dependency, neither of these provide an assertion solution for libraries which should be independent of rx. So, pull the assertion code out of util, and put it into opr, as a new opr_Assert() macro. Implement the userspace osi_Assert in terms of this macro, leaving the kernel variant untouched. Update callers to the new macro and header file names. Change-Id: I780b30ec1ea1207daa17127df4d5fbf9a94481b6 Reviewed-on: http://gerrit.openafs.org/5394 Reviewed-by: Derrick Brashear <shadow@dementix.org> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Move string manipulation functions out of util Some functions in libafsutil depend upon the RX libraries, which means that pulling in other functions in this library can create a dependency upon RX. This is less than ideal for low-level libraries such as cmd and comerr. So, create a new low-level library (currently named 'opr') which can contain low-level functions from util, and elsewhere. This library should have no dependencies other than on system libraries and libroken. Change-Id: I703db3da4d8faf79ee82bf572af09d07152d9b25 Reviewed-on: http://gerrit.openafs.org/5363 Reviewed-by: Derrick Brashear <shadow@dementix.org> Tested-by: Derrick Brashear <shadow@dementix.org>
viced: Rationalise FS_STATS_DETAILED logging Every RPC handler in the fileserver contained a copy of an identical code block to handle starting, stopping, and recording detailed logging statistics. Replace all of this with a structure and 4 helper functions, which will make maintenance much easier. Change-Id: Ie2b0fa13fcc3e261ba435f1560e7ab5adf477afb Reviewed-on: http://gerrit.openafs.org/4765 Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>