Building with gcc10 reports the following issues when building
GSS:
gss_util.h:37: multiple definition of `this_realm';
gssd.h:73: multiple definition of `clnt_list';
svcgssd.h:38: multiple definition of `krb_enabled';
Properly scope these variables.
Change-Id: I05fc298fb90d67314c6963273688c2577099188a
Test-Parameters: env=SHARED_KEY=true testlist=sanity,recovery-small,sanity-sec
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/44363
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
#include <stdlib.h>
#include "write_bytes.h"
#include <stdlib.h>
#include "write_bytes.h"
+extern char *this_realm;
extern gss_cred_id_t gssd_creds;
void pgsserr(char *msg, u_int32_t maj_stat, u_int32_t min_stat,
extern gss_cred_id_t gssd_creds;
void pgsserr(char *msg, u_int32_t maj_stat, u_int32_t min_stat,
extern char gethostname_ex[PATH_MAX];
extern int use_memcache;
extern char gethostname_ex[PATH_MAX];
extern int use_memcache;
-TAILQ_HEAD(clnt_list_head, clnt_info) clnt_list;
-
struct clnt_info {
TAILQ_ENTRY(clnt_info) list;
char *dirname;
struct clnt_info {
TAILQ_ENTRY(clnt_info) list;
char *dirname;
int update_client_list(void);
void handle_krb5_upcall(struct clnt_info *clp);
void lgssd_run(void);
int update_client_list(void);
void handle_krb5_upcall(struct clnt_info *clp);
void lgssd_run(void);
+struct clnt_info *clnt_list_first_entry(void);
extern int lgssd_mutex_downcall;
extern int lgssd_mutex_downcall;
int i;
struct clnt_info *clp;
int i;
struct clnt_info *clp;
- for (clp = clnt_list.tqh_first; clp != NULL; clp = clp->list.tqe_next)
+ for (clp = clnt_list_first_entry(); clp != NULL; clp = clp->list.tqe_next)
{
i = clp->krb5_poll_index;
if (i >= 0 && pollarray[i].revents) {
{
i = clp->krb5_poll_index;
if (i >= 0 && pollarray[i].revents) {
* and rescan the whole {pipefs_nfsdir} when this happens.
*/
* and rescan the whole {pipefs_nfsdir} when this happens.
*/
+TAILQ_HEAD(clnt_list_head, clnt_info) clnt_list;
+
struct pollfd * pollarray;
int pollsize; /* the size of pollaray (in pollfd's) */
struct pollfd * pollarray;
int pollsize; /* the size of pollaray (in pollfd's) */
pollarray = calloc(pollsize, sizeof(struct pollfd));
}
pollarray = calloc(pollsize, sizeof(struct pollfd));
}
+struct clnt_info *clnt_list_first_entry(void)
+{
+ return clnt_list.tqh_first;
+}
+
/*
* This is run after a DNOTIFY signal, and should clear up any
* directories that are no longer around, and re-scan any existing
/*
* This is run after a DNOTIFY signal, and should clear up any
* directories that are no longer around, and re-scan any existing
#include <sys/queue.h>
#include <gssapi/gssapi.h>
#include <sys/queue.h>
#include <gssapi/gssapi.h>
int handle_channel_request(FILE *f);
void svcgssd_run(void);
int gssd_prepare_creds(int must_srv_mgs, int must_srv_mds, int must_srv_oss);
int handle_channel_request(FILE *f);
void svcgssd_run(void);
int gssd_prepare_creds(int must_srv_mgs, int must_srv_mds, int must_srv_oss);