From: zacheiss Date: Thu, 11 Jan 2001 19:38:56 +0000 (+0000) Subject: Off by one error in argv; prevents owning user from updating their X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/7617c632940f4c3140f2d572b18fac4ed4569644 Off by one error in argv; prevents owning user from updating their own machines. --- diff --git a/server/qaccess.pc b/server/qaccess.pc index 06c72ba7..b2d827b0 100644 --- a/server/qaccess.pc +++ b/server/qaccess.pc @@ -486,7 +486,7 @@ int access_host(struct query *q, char *argv[], client *cl) { /* host owner also cannot change contact, status, address, owner, or acomment */ - if (strcmp(argv[6 + idx], strtrim(contact)) || + if (strcmp(argv[6], strtrim(contact)) || (status != atoi(argv[8 + idx])) || strcmp(argv[10 + idx], strtrim(address)) || strcmp(argv[11 + idx], strtrim(mtype)) || @@ -495,7 +495,7 @@ int access_host(struct query *q, char *argv[], client *cl) return MR_PERM; /* Billing contact field didn't appear until version 6 */ if (q->version >= 6) - if (strcmp(argv[8], strtrim(billing_contact))) + if (strcmp(argv[7], strtrim(billing_contact))) return MR_PERM; } else