Send Linux-ha-cvs mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."
Today's Topics:
1. Linux-HA CVS: mgmt by zhenh from
([email protected])
2. Linux-HA CVS: crm by andrew from
([email protected])
3. Linux-HA CVS: crm by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Sat, 4 Feb 2006 20:03:23 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : mgmt
Dir : linux-ha/mgmt/daemon
Modified Files:
mgmt_crm.c
Log Message:
create cib channel with cib_command parameter
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/daemon/mgmt_crm.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- mgmt_crm.c 28 Jan 2006 07:27:53 -0000 1.11
+++ mgmt_crm.c 5 Feb 2006 03:03:23 -0000 1.12
@@ -187,7 +187,7 @@
mgmt_log(LOG_INFO,"init_crm");
cib_conn = cib_new();
for (i = 0; i < max_try ; i++) {
- ret = cib_conn->cmds->signon(cib_conn, client_name, cib_query);
+ ret = cib_conn->cmds->signon(cib_conn, client_name,
cib_command);
if (ret == cib_ok) {
break;
}
------------------------------
Message: 2
Date: Sun, 5 Feb 2006 02:14:15 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm/cib
Modified Files:
io.c
Log Message:
Use the group and user names
Check the calculated group against the group
and calculated user against the user... duh :-(
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/io.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- io.c 2 Feb 2006 13:40:28 -0000 1.42
+++ io.c 5 Feb 2006 09:14:14 -0000 1.43
@@ -1,4 +1,4 @@
-/* $Id: io.c,v 1.42 2006/02/02 13:40:28 andrew Exp $ */
+/* $Id: io.c,v 1.43 2006/02/05 09:14:14 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -104,6 +104,10 @@
return root;
}
+#include <sys/types.h>
+#include <pwd.h>
+#include <grp.h>
+
/*
* It is the callers responsibility to free the output of this function
*/
@@ -125,22 +129,31 @@
if (s_res == 0) {
FILE *cib_file = NULL;
- gboolean user_readwritable = (buf.st_gid == atoi(HA_CCMUID)) &&
(buf.st_mode & (S_IRGRP|S_IWGRP));
+ struct passwd *cib_user = getpwnam(HA_CCMUSER);
+ gboolean user_readwritable = (
+ cib_user != NULL
+ && buf.st_uid == cib_user->pw_uid
+ && (buf.st_mode & (S_IRGRP|S_IWGRP)));
if( S_ISREG(buf.st_mode) == FALSE ) {
crm_err("%s must be a regular file", filename);
exit(100);
} else if( user_readwritable == FALSE ) {
- gboolean group_readwritable = (buf.st_uid ==
atoi(HA_APIGID)) && (buf.st_mode & (S_IRUSR|S_IWUSR));
+ struct group *cib_grp = getgrnam(HA_APIGROUP);
+ gboolean group_readwritable = (
+ cib_grp != NULL
+ && buf.st_gid == cib_grp->gr_gid
+ && (buf.st_mode & (S_IRUSR|S_IWUSR)));
+
if( group_readwritable == FALSE ) {
crm_err("%s must be owned and read/writeable by
user %s,"
" or owned and read/writable by group
%s",
- filename, HA_CCMUID, HA_APIGID);
+ filename, HA_CCMUSER, HA_APIGROUP);
exit(100);
}
crm_warn("%s should be owned and read/writeable by user
%s",
- filename, HA_CCMUID);
+ filename, HA_CCMUSER);
}
cib_file = fopen(filename, "r");
------------------------------
Message: 3
Date: Sun, 5 Feb 2006 04:52:01 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : crm
Dir : linux-ha/crm/cib
Modified Files:
io.c
Log Message:
Stupid...
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/io.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -3 -r1.43 -r1.44
--- io.c 5 Feb 2006 09:14:14 -0000 1.43
+++ io.c 5 Feb 2006 11:52:01 -0000 1.44
@@ -1,4 +1,4 @@
-/* $Id: io.c,v 1.43 2006/02/05 09:14:14 andrew Exp $ */
+/* $Id: io.c,v 1.44 2006/02/05 11:52:01 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -133,7 +133,7 @@
gboolean user_readwritable = (
cib_user != NULL
&& buf.st_uid == cib_user->pw_uid
- && (buf.st_mode & (S_IRGRP|S_IWGRP)));
+ && (buf.st_mode & (S_IRUSR|S_IWUSR)));
if( S_ISREG(buf.st_mode) == FALSE ) {
crm_err("%s must be a regular file", filename);
@@ -144,7 +144,7 @@
gboolean group_readwritable = (
cib_grp != NULL
&& buf.st_gid == cib_grp->gr_gid
- && (buf.st_mode & (S_IRUSR|S_IWUSR)));
+ && (buf.st_mode & (S_IRGRP|S_IWGRP)));
if( group_readwritable == FALSE ) {
crm_err("%s must be owned and read/writeable by
user %s,"
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 27, Issue 25
********************************************