a couple of minor changes picked up by newer compilers...
open() needs 3 arguments when O_CREAT is specified (compile error)
and fchown() gives a warning because the return value is ignored (so I
made it slightly less ignored)
diff -r 43dd260b587e trunk/exec/keygen.c
--- a/trunk/exec/keygen.c Wed Apr 02 05:44:21 2008 +0200
+++ b/trunk/exec/keygen.c Sat Apr 12 18:26:59 2008 +0200
@@ -72,7 +72,7 @@ int main (void) {
/*
* Open key
*/
- authkey_fd = open ("/etc/ais/authkey", O_CREAT|O_WRONLY);
+ authkey_fd = open ("/etc/ais/authkey", O_CREAT|O_WRONLY, 640);
if (authkey_fd == -1) {
perror ("Could not create /etc/ais/authkey");
exit (1);
@@ -80,7 +80,7 @@ int main (void) {
/*
* Set security of authorization key to uid = 0 uid = 0 mode = 0400
*/
- fchown (authkey_fd, 0, 0);
+ res = fchown (authkey_fd, 0, 0);
fchmod (authkey_fd, 0400);
printf ("Writing openais key to /etc/ais/authkey.\n");
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais