116 sql =
DqsSpecifyInit(
"policies p, parameters_policies x, parameters y, categories c ",
"y.name, c.name, x.value");
206 else if (status == -1) {}
237 if (policy == NULL) {
253 while (status == 0) {
254 if (strncmp(data.
category,
"enforcer", 8) == 0) {
259 if (strncmp(data.
category,
"zone", 4) == 0) {
269 if (strncmp(data.
category,
"parent", 6) == 0) {
274 if (strncmp(data.
name,
"ttlds", 5) == 0) {
277 else if (strncmp(data.
name,
"ttl", 3) == 0) {
281 if (strncmp(data.
category,
"signature", 9) == 0) {
289 if (strncmp(data.
category,
"denial", 6) == 0) {
298 if (strncmp(data.
category,
"zsk", 3) == 0) {
301 if (strncmp(data.
name,
"repository",10) == 0) policy->
zsk->
sm=data.
value;
307 if (strncmp(data.
category,
"ksk", 3) == 0) {
310 if (strncmp(data.
name,
"repository",10) == 0) policy->
ksk->
sm=data.
value;
318 if (strncmp(data.
category,
"keys", 4) == 0) {
394 else if (status == -1) {}
440 if (policy == NULL) {
466 else if (status == -1) {}
513 char* hex_chars =
"0123456789abcdef";
516 if (policy == NULL) {
523 if (datetime_now == NULL) {
524 printf(
"Couldn't turn \"now\" into a date, quitting...\n");
561 else if (status == -1) {
601 #ifdef HAVE_ARC4RANDOM
603 salt[i] = hex_chars[arc4random()%strlen(hex_chars)];
608 salt[i] = hex_chars[rand()%strlen(hex_chars)];
624 nchar = snprintf(buffer,
sizeof(buffer),
625 "UPDATE policies SET salt = '%s', salt_stamp = '%s' WHERE ID = %lu",
628 nchar = snprintf(buffer,
sizeof(buffer),
629 "UPDATE policies SET salt = '%s', salt_stamp = DATETIME('%s') WHERE ID = %lu",
632 if (nchar <
sizeof(buffer)) {
689 nchar = snprintf(buffer,
sizeof(buffer),
690 "UPDATE policies SET salt_stamp = NULL WHERE ID = %lu",
691 (
unsigned long) policy_id);
693 if (nchar <
sizeof(buffer)) {
721 if (policy == NULL) {
748 else if (status == -1) {}
785 else if (status == -1) {}
817 if (policy == NULL || policy->
name[0] ==
'\0') {
830 else if (status == -1) {
893 DbInt(row, 1, policy_id);
895 else if (status == -1) {}
930 if (policy_id <= 0) {
958 if (policy == NULL) {
978 policy->
keys == NULL ||
979 policy->
ksk == NULL ||
980 policy->
zsk == NULL ||
982 policy->
zone == NULL ||