src/server/config/acl.c

changeset 115
51d9a15eac98
parent 101
7fbcdbad0baa
child 415
d938228c382e
equal deleted inserted replaced
114:c3a0f1275d71 115:51d9a15eac98
111 UcxAllocator *mp = f->parser.mp; 111 UcxAllocator *mp = f->parser.mp;
112 112
113 ssize_t tkn = 0; 113 ssize_t tkn = 0;
114 sstr_t *tk = sstrsplit(line, sstr(":"), &tkn); 114 sstr_t *tk = sstrsplit(line, sstr(":"), &tkn);
115 if(!tk || tkn < 3) { 115 if(!tk || tkn < 3) {
116 fprintf(stderr, "parse_ace: to few tokens\n"); 116 log_ereport(LOG_FAILURE, "parse_ace: to few tokens");
117 return 1; 117 return 1;
118 } 118 }
119 119
120 ACEConfig *ace = OBJ_NEW(mp, ACEConfig); 120 ACEConfig *ace = OBJ_NEW(mp, ACEConfig);
121 memset(ace, 0, sizeof(ACEConfig)); 121 memset(ace, 0, sizeof(ACEConfig));
154 * get the access mask 154 * get the access mask
155 */ 155 */
156 156
157 if(n >= tkn) { 157 if(n >= tkn) {
158 // to few tokens 158 // to few tokens
159 fprintf(stderr, "parse_ace: ace incomplete\n"); 159 log_ereport(LOG_FAILURE, "parse_ace: ace incomplete");
160 return 1; 160 return 1;
161 } 161 }
162 s = tk[n]; 162 s = tk[n];
163 163
164 ssize_t maskn = 0; 164 ssize_t maskn = 0;
210 } 210 }
211 n++; 211 n++;
212 } 212 }
213 213
214 if(!complete) { 214 if(!complete) {
215 fprintf(stderr, "parse_ace: ace incomplete\n"); 215 log_ereport(LOG_FAILURE, "parse_ace: ace incomplete");
216 return 1; 216 return 1;
217 } 217 }
218 218
219 cur->entries = ucx_list_append_a(mp, cur->entries, ace); 219 cur->entries = ucx_list_append_a(mp, cur->entries, ace);
220 220

mercurial