3 * Copyright 2000, International Business Machines Corporation and others.
6 * This software has been released under the terms of the IBM Public
7 * License. For details, see the LICENSE file in the top-level source
8 * directory or online at http://www.openafs.org/dl/license10.html
11 #include <afsconfig.h>
12 #include <afs/param.h>
15 #include "uss_procs.h"
17 #include "uss_kauth.h"
22 extern int yylex(void);
23 static int yyerror(char *);
44 %token <strval> STRING_TKN
48 %type <strval> accesslist
55 { $$ = ($1 == 0)? $2 : $1;}
59 STRING_TKN /*2-directory name*/
61 STRING_TKN /*4-owner*/
62 accesslist /*5-access list*/
63 {$$ = uss_perr = uss_procs_BuildDir($2,$3,$4,$5);}
65 STRING_TKN /*2-filename*/
67 STRING_TKN /*4-owner*/
68 STRING_TKN /*5-rototype*/
69 {$$ = uss_perr = uss_procs_CpFile($2, $3, $4, $5);}
71 STRING_TKN /*2-filename*/
73 STRING_TKN /*4-owner*/
74 STRING_TKN /*5-file content*/
75 {$$ = uss_perr = uss_procs_EchoToFile($2, $3, $4, $5);}
77 STRING_TKN /*2-command string*/
78 {$$ = uss_perr = uss_procs_Exec($2);}
80 STRING_TKN /*2-filename1*/
81 STRING_TKN /*3-filename2*/
82 {$$ = uss_perr = uss_procs_SetLink($2, $3,'h');}
85 STRING_TKN /*2-filename1*/
86 STRING_TKN /*3-filename2*/
87 {$$ = uss_perr = uss_procs_SetLink($2, $3,'s');}
89 STRING_TKN /*2-vol name*/
90 STRING_TKN /*3-server*/
91 STRING_TKN /*4-partition*/
92 STRING_TKN /*5-quota*/
93 STRING_TKN /*6-Mount point*/
94 STRING_TKN /*7-Owner*/
95 accesslist /*8-access list*/
96 {$$ = uss_perr = uss_vol_CreateVol($2, $3, $4, $5, $6, $7, $8);}
98 STRING_TKN /*2-declared dir*/
99 {$$ = uss_perr = uss_procs_AddToDirPool($2);}
101 STRING_TKN /*2-user name*/
102 STRING_TKN /*3-password lifetime (days<255)*/
103 STRING_TKN /*4-reuse/noreuse */
104 STRING_TKN /*5-failed login attempts */
105 STRING_TKN /*6-lockout time */
106 {$$ = uss_perr = uss_kauth_SetFields($2, $3, $4, $5, $6);}
108 STRING_TKN /*2-vol name*/
109 STRING_TKN /*3-server*/
110 STRING_TKN /*4-partition*/
111 STRING_TKN /*5-quota*/
112 STRING_TKN /*6-Mount point*/
113 STRING_TKN /*7-Owner*/
114 STRING_TKN /*8-access list*/
115 {$$ = uss_perr = uss_vol_CreateVol($2, $3, $4, $5, $6, $7, $8);}
116 | EOL_TKN /*End of line */
119 {uss_procs_PrintErr(line-1, " near \"%s\"\n",yylval.strval);}
123 accesslist : /* empty */
128 {strcat($1," "); strcat($2," ");strcat($1,strcat($2,$3));strcpy($$,$1);}
136 fprintf(stderr,"%s. ",s);