* Add an alias to the aliases redblack tree.
* Returns NULL on success and an error string on failure.
*/
-char *
+const char *
alias_add(char *name, int type, struct member *members)
{
static char errbuf[512];
case 84:
#line 562 "gram.y"
{
- char *s;
+ const char *s;
if ((s = alias_add(yyvsp[-2].string, HOSTALIAS, yyvsp[0].member)) != NULL) {
sudoerserror(s);
YYERROR;
case 89:
#line 582 "gram.y"
{
- char *s;
+ const char *s;
if ((s = alias_add(yyvsp[-2].string, CMNDALIAS, yyvsp[0].member)) != NULL) {
sudoerserror(s);
YYERROR;
case 94:
#line 602 "gram.y"
{
- char *s;
+ const char *s;
if ((s = alias_add(yyvsp[-2].string, RUNASALIAS, yyvsp[0].member)) != NULL) {
sudoerserror(s);
YYERROR;
case 97:
#line 615 "gram.y"
{
- char *s;
+ const char *s;
if ((s = alias_add(yyvsp[-2].string, USERALIAS, yyvsp[0].member)) != NULL) {
sudoerserror(s);
YYERROR;
;
hostalias : ALIAS '=' hostlist {
- char *s;
+ const char *s;
if ((s = alias_add($1, HOSTALIAS, $3)) != NULL) {
sudoerserror(s);
YYERROR;
;
cmndalias : ALIAS '=' cmndlist {
- char *s;
+ const char *s;
if ((s = alias_add($1, CMNDALIAS, $3)) != NULL) {
sudoerserror(s);
YYERROR;
;
runasalias : ALIAS '=' userlist {
- char *s;
+ const char *s;
if ((s = alias_add($1, RUNASALIAS, $3)) != NULL) {
sudoerserror(s);
YYERROR;
;
useralias : ALIAS '=' userlist {
- char *s;
+ const char *s;
if ((s = alias_add($1, USERALIAS, $3)) != NULL) {
sudoerserror(s);
YYERROR;
/* alias.c */
bool no_aliases(void);
-char *alias_add(char *name, int type, struct member *members);
+const char *alias_add(char *name, int type, struct member *members);
int alias_compare(const void *a1, const void *a2);
struct alias *alias_get(char *name, int type);
struct alias *alias_remove(char *name, int type);