Go to file
Andrew Deason 4ce922d339 afs: Properly type afs_osi_suser cred arg
Currently, afs_osi_suser is declared with a void* argument, even
though its only argument is always effectively a afs_ucred_t*. This
allows us to call afs_osi_suser with any pointer type without the
compiler complaining. Currently, some callers call afs_osi_suser with
an incorrectly-typed afs_ucred_t** instead, like so:

    func(afs_ucred_t **credpp)
    {
        afs_ucred_t **acred = *acredpp; /* incorrect assignment */
        if (afs_osi_suser(acred)) {
            /* ... */
        }
    }

The actual code in the tree hides this to some degree behind various
function calls and layers of indirection (e.g. afs_suser()), but this
is effectively what we do. This causes compiler warnings because we
are doing incorrect pointer assignments, but the end result works
because afs_osi_suser actually uses an afs_ucred_t*.

The type confusion makes it very easy to accidentally give the wrong
type to afs_osi_suser. This only really matters on SOLARIS, since that
is the only platform that actually uses its argument to
afs_osi_suser().

To fix all of this, just declare afs_osi_suser as taking an
afs_ucred_t*, and fix all of the relevant functions to handle the
right type.

Change-Id: I1366aedf0f3d7689735a9424c5272233931e3bf2
Reviewed-on: https://gerrit.openafs.org/14085
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2020-03-06 11:12:51 -05:00
build-tools regen.sh: Use libtoolize -i, and .gitignore generated build-tools 2016-11-06 00:36:18 -04:00
doc Cleanup vestiges of old shared library build directories 2020-03-05 21:53:26 -05:00
src afs: Properly type afs_osi_suser cred arg 2020-03-06 11:12:51 -05:00
tests tests: skip vos tests when a vlserver is already running 2020-01-20 15:16:14 -05:00
.gitignore Remove alpha_dux/alpha_osf references 2018-09-22 17:05:26 -04:00
.gitreview Add .gitreview 2018-02-04 15:34:55 -05:00
.mailmap git: add a mailmap file 2016-09-25 21:05:23 -04:00
.splintrc
acinclude.m4 autoconf: remove unnecessary mkdir during configure 2018-10-19 00:16:48 -04:00
CODING rxkad: v5der.c format truncation warnings 2019-07-26 09:05:29 -04:00
configure-libafs.ac autoconf: updates and cleanup 2018-08-11 12:22:56 -04:00
configure.ac Run ctfconvert/ctfmerge for all objects 2018-09-28 08:30:07 -04:00
CONTRIBUTING openafs: add a contributor code of conduct 2015-09-18 20:38:28 -04:00
INSTALL FBSD: Remove support for 8.x and 9.x 2020-01-10 16:10:57 -05:00
libafsdep Move build support files into build-tools 2010-07-14 20:40:36 -07:00
LICENSE autoconf: import gcc function attribute check macro 2018-08-10 07:55:00 -04:00
Makefile-libafs.in
Makefile.in tests: Explicitly build target 'all' by default 2020-01-10 16:10:49 -05:00
NEWS Default to crypt mode for unix clients 2017-08-05 18:47:04 -04:00
NTMakefile rxgk: Add NTMakefile to install headers 2019-08-28 02:50:58 -04:00
README Tweak grammar in README 2015-12-28 19:32:17 -05:00
README-WINDOWS Update windows build documentation 2013-07-02 15:14:09 -07:00
regen.sh regen.sh: Use libtoolize -i, and .gitignore generated build-tools 2016-11-06 00:36:18 -04:00

AFS is a distributed file system that enables users to share and
access all of the files stored in a network of computers as easily as
they access the files stored on their local machines. The file system is
called distributed for this exact reason: files can reside on many
different machines, but are available to users on every machine.

OpenAFS 1.0 was originally released by IBM under the terms of the
IBM Public License 1.0 (IPL10).  For details on IPL10 see the LICENSE
file in this directory.  The current OpenAFS distribution is licensed
under a combination of the IPL10 and many other licenses as granted by
the relevant copyright holders.  The LICENSE file in this directory
contains more details, thought it is not a comprehensive statement.

See INSTALL for information about building and installing OpenAFS
on various platforms.

See CODING for developer information and guidelines.

See NEWS for recent changes to OpenAFS.