Go to file
Andrew Deason d231134aad auth: Avoid cellconfig.c stdio renaming
Since commit 35777145 (solaris-fopen-sucks-20060916), cellconfig.c has
redirected fopen, fclose, and fgets to local functions on
non-64bit-sparc Solaris, in order to work around that platform's stdio
limitations.

Commit 7c431f7571 (auth: retire writeconfig.c) moved the contents of
writeconfig.c into cellconfig.c. The previous writeconfig.c contained
some calls to stdio, including calling fprintf() on a pointer returned
by fopen() in that file.

Because fopen() was redirected to our local version, this means that
afsconf_SetExtendedCellInfo() calls fopen() to get an
afsconf_iobuffer*, and passes that pointer to the real system
fprintf() later on (instead of a native FILE*). The compiler does warn
about this, but this only happens on Solaris, where --enable-checking
is not implemented, so the build never fails.

To avoid this, remove the #defines for fopen, fgets, and fclose.
Instead, change all of the old cellconfig.c callers to explicitly call
afsconf_fopen, afsconf_fgets, and afsconf_fclose. On the affected
Solaris platforms, we keep our local definitions, and for other
platforms, we just make those functions call their system stdio
equivalents. For the code that was pulled in from writeconfig.c,
callers will just call the system fopen, fprintf, and fclose.

We still keep our local afsconf_FILE* definition on all platforms, so
the compiler will still do typechecking for our local afsconf_f*
functions on all platforms. So now if we make a mistake, it should be
a mistake on all platforms, so platforms with --enable-checking should
flag the error.

Change-Id: I4064d7f5ee82d5acab04a33b01c0603564a391e8
Reviewed-on: https://gerrit.openafs.org/14214
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2020-07-13 16:49:50 -04:00
build-tools make-release: Run git describe once 2020-06-18 21:15:15 -04:00
doc Cleanup vestiges of old shared library build directories 2020-03-05 21:53:26 -05:00
src auth: Avoid cellconfig.c stdio renaming 2020-07-13 16:49:50 -04:00
tests tests: Modernize writekeyfile.c 2020-06-19 11:48:57 -04: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 Use autoconf-archive m4 from src/external 2020-05-08 11:30:36 -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 Use autoconf-archive m4 from src/external 2020-05-08 11:30:36 -04:00
Makefile-libafs.in
Makefile.in make-release: Create output directory if needed 2020-06-18 20:57:54 -04:00
NEWS Update NEWS for OpenAFS 1.9.0 2020-05-08 00:20:24 -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 Use autoconf-archive m4 from src/external 2020-05-08 11:30:36 -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.