Fix the unpack in the example sysvmq audit reader script to
correctly unpack the message type, which is an native long.
From the msgrcv perl docoumentation:
Note that when a message is received, the message type as a native
long integer will be the first thing in VAR, followed by the actual
message. This packing may be opened with "unpack("l! a*")".
Change-Id: I5c5480c30d530b384d8057fb071b01e67f1b4ad2
Reviewed-on: http://gerrit.openafs.org/10445
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
my ($msg, $msgtype, $msgtext);
while (1) {
if (msgrcv($mqid, $msg, $msgsize, 0, 0)) {
- ($msgtype, $msgtext) = unpack("i! a*", $msg);
+ ($msgtype, $msgtext) = unpack("l! a*", $msg);
print $msgtext, "\n";
}
}