bozo: Do not create client directory and symlinks

Each time the bosserver starts, it checks for the presence of the client
configuration directory and the CellServDB and ThisCell files within it.
When not found, the bosserver creates the client cell configuration
directory. When the CellServDB and ThisCell files are not present in the
client configuration directory, the bosserver creates symlinks to the
server's CellServDB and ThisCell files.  This feature of the bosserver
was a convenience when older versions of vos and pts required a client
configuration directory.

However, modern deployments tend to use packaging, with separate client
and server packages.  The client configuration directory and files in it
are typically managed by the client packaging.  Currently, packagers
must work around these symlinks created by the bosserver.  Additionally,
the CellServDB and ThisCell symlinks are hazardous since writing to the
client-side configuration will overwrite the server configuration.

This commit removes the creation the client configuration directory and
the CellServDB and ThisCell symlinks during bosserver startup.  This
change is intended to decouple the server from the client, help to avoid
overwriting the server configuration, and avoid requiring client artifacts
on a server.

Reviewed-on: https://gerrit.openafs.org/12586
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit c8aae4da4fcfd22c19fc9c8835960005554ac9d6)

Change-Id: I76d24eadaecd19d21f12b8bd85eca2a4888d3e4c
Reviewed-on: https://gerrit.openafs.org/15512
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
This commit is contained in:
Michael Meffie 2017-03-29 15:58:24 -04:00 committed by Stephan Wiesand
parent c495c81754
commit 2899837875

View File

@ -246,13 +246,9 @@ MakeDir(const char *adir)
static int
CreateDirs(const char *coredir)
{
if ((!strncmp
(AFSDIR_USR_DIRPATH, AFSDIR_CLIENT_ETC_DIRPATH,
strlen(AFSDIR_USR_DIRPATH)))
||
(!strncmp
if (!strncmp
(AFSDIR_USR_DIRPATH, AFSDIR_SERVER_BIN_DIRPATH,
strlen(AFSDIR_USR_DIRPATH)))) {
strlen(AFSDIR_USR_DIRPATH))) {
if (MakeDir(AFSDIR_USR_DIRPATH))
return errno;
}
@ -272,29 +268,6 @@ CreateDirs(const char *coredir)
return errno;
if (MakeDir(AFSDIR_SERVER_LOGS_DIRPATH))
return errno;
#ifndef AFS_NT40_ENV
if (!strncmp
(AFSDIR_CLIENT_VICE_DIRPATH, AFSDIR_CLIENT_ETC_DIRPATH,
strlen(AFSDIR_CLIENT_VICE_DIRPATH))) {
if (MakeDir(AFSDIR_CLIENT_VICE_DIRPATH))
return errno;
}
if (MakeDir(AFSDIR_CLIENT_ETC_DIRPATH))
return errno;
if (symlink(AFSDIR_SERVER_THISCELL_FILEPATH,
AFSDIR_CLIENT_THISCELL_FILEPATH)) {
if (errno != EEXIST) {
return errno;
}
}
if (symlink(AFSDIR_SERVER_CELLSERVDB_FILEPATH,
AFSDIR_CLIENT_CELLSERVDB_FILEPATH)) {
if (errno != EEXIST) {
return errno;
}
}
#endif /* AFS_NT40_ENV */
if (coredir) {
if (MakeDir(coredir))
return errno;