William Roberts wrote:
<snip>
+#define LINE_LEN 255
Dont like these hardcodes, can't we allow arbitrary sized lines?
Not sure it is worth the effort...
+
+/* Reevaluate this number when support for more commands are added */
+#define MAX_OPTIONS 15
+
+static int audit_rules_parse_and_add(int audit_fd, char *line)
+{
+ char *argv[MAX_OPTIONS];
Dont like these hardcodes, can't we allow arbitrary amount of options?
Actually, no. Though I missed the AUDIT_MAX_FIELDS in audit.h and
switched to that.
<snip>
+ while (fgets(line, sizeof(line), rules)) {
+ SLOGE(line);
+ if (line[0] != '-')
+ continue;
What if the line is bigger then what fgets got? Shouldn't we be growing
a buffer based on newline?
Not sure it is worth the effort.
--
This message was distributed to subscribers of the seandroid-list mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe seandroid-list" without quotes as the message.