* [PATCH] Error message is not appropriate when try to set gid to negative
@ 2008-08-08 4:03 Cai Xianchao
2008-08-08 13:42 ` Steve Grubb
0 siblings, 1 reply; 2+ messages in thread
From: Cai Xianchao @ 2008-08-08 4:03 UTC (permalink / raw)
To: sgrubb, Linux Audit
Hello Steve,
The error message is not appropriate when I try to set gid to
negative. the value of "Unknown group:" should be the gid rather
than "gid". There is the same problem in uids.
I did as fallows:
#auditctl -a exit,always -F gid=-1
Unknown group: gid
-F unknown field: gid=-1
Signed-off-by: Cai Xianchao <caixianchao@cn.fujistu.com>
---
diff --git a/deprecated.c b/deprecated.c
index e05e826..2d32ad3 100644
--- a/deprecated.c
+++ b/deprecated.c
@@ -259,7 +259,7 @@ int audit_rule_fieldpair(struct audit_rule *rule,
const char *pair, int flags)
if (name_to_uid(v,
&rule->values[rule->field_count])) {
audit_msg(LOG_ERR, "Unknown
user: %s",
- pair);
+ v);
return -2;
}
}
@@ -275,7 +275,7 @@ int audit_rule_fieldpair(struct audit_rule *rule,
const char *pair, int flags)
if (name_to_gid(v,
&rule->values[rule->field_count])) {
audit_msg(LOG_ERR, "Unknown
group: %s",
- pair);
+ v);
return -2;
}
}
diff --git a/libaudit.c b/libaudit.c
index 4bedfaf..37e96e5 100644
--- a/libaudit.c
+++ b/libaudit.c
@@ -851,7 +851,7 @@ int audit_rule_fieldpair_data(struct audit_rule_data
**rulep, const char *pair,
if (audit_name_to_uid(v,
&rule->values[rule->field_count])) {
audit_msg(LOG_ERR, "Unknown
user: %s",
- pair);
+ v);
return -2;
}
}
@@ -867,7 +867,7 @@ int audit_rule_fieldpair_data(struct audit_rule_data
**rulep, const char *pair,
if (audit_name_to_gid(v,
&rule->values[rule->field_count])) {
audit_msg(LOG_ERR, "Unknown
group: %s",
- pair);
+ v);
return -2;
}
}
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] Error message is not appropriate when try to set gid to negative
2008-08-08 4:03 [PATCH] Error message is not appropriate when try to set gid to negative Cai Xianchao
@ 2008-08-08 13:42 ` Steve Grubb
0 siblings, 0 replies; 2+ messages in thread
From: Steve Grubb @ 2008-08-08 13:42 UTC (permalink / raw)
To: Cai Xianchao; +Cc: Linux Audit
On Friday 08 August 2008 00:03:24 Cai Xianchao wrote:
> The error message is not appropriate when I try to set gid to
> negative. the value of "Unknown group:" should be the gid rather
> than "gid". There is the same problem in uids.
OK, I tried to apply the patch and got:
patching file deprecated.c
patch: **** malformed patch at line 6: const char *pair, int flags)
I eventually did the edits by hand since they were simple. Watch the word
wrapping. :)
Thanks for the patch !
-Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-08 13:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08 4:03 [PATCH] Error message is not appropriate when try to set gid to negative Cai Xianchao
2008-08-08 13:42 ` Steve Grubb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox