Add a sequence number in the aliases for loop detection. If we find
an alias with the seqno already set to the current (global) value we know we've visited it before so ignore it.
This commit is contained in:
6
parse.h
6
parse.h
@@ -119,6 +119,7 @@ struct member {
|
||||
struct alias {
|
||||
char *name; /* alias name */
|
||||
int type; /* {USER,HOST,RUNAS,CMND}ALIAS */
|
||||
unsigned int seqno; /* sequence number */
|
||||
struct member_list members; /* list of alias members */
|
||||
};
|
||||
|
||||
@@ -140,6 +141,11 @@ struct defaults {
|
||||
extern struct userspec_list userspecs;
|
||||
extern struct defaults_list defaults;
|
||||
|
||||
/*
|
||||
* Alias sequence number to avoid loops.
|
||||
*/
|
||||
extern unsigned int alias_seqno;
|
||||
|
||||
/*
|
||||
* Prototypes
|
||||
*/
|
||||
|
Reference in New Issue
Block a user