mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
4ce922d339
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> |
||
---|---|---|
build-tools | ||
doc | ||
src | ||
tests | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
.splintrc | ||
acinclude.m4 | ||
CODING | ||
configure-libafs.ac | ||
configure.ac | ||
CONTRIBUTING | ||
INSTALL | ||
libafsdep | ||
LICENSE | ||
Makefile-libafs.in | ||
Makefile.in | ||
NEWS | ||
NTMakefile | ||
README | ||
README-WINDOWS | ||
regen.sh |
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.