Change in vdsm[master]: Alert if vdsm log has wrong user\group permissions
shuming at linux.vnet.ibm.com
shuming at linux.vnet.ibm.com
Sun Nov 18 13:51:36 UTC 2012
Shu Ming has posted comments on this change.
Change subject: Alert if vdsm log has wrong user\group permissions
......................................................................
Patch Set 3: No score
(1 inline comment)
....................................................
File vdsm/vdsmd.init.in
Line 506: test_conflicting_conf); then
Line 507: return 1
Line 508: fi
Line 509:
Line 510: if ! verify_log_permissions; then
In verify_log_permissions(), the function fails if $VDSM_USER is not equal to $LOG_OWNER or $VDSM_GROUP not equal to $LOG_GROUP either. And the returning value 1 means functions fails. In the contrary, returning value 0 means success.
...
110 if [ "$VDSM_USER" -ne "$LOG_OWNER" ] || [ "$VDSM_GROUP" -ne "$LOG_GROUP" ]; then
111 return 1 <--- fails
...
I think if verrify_log_permissions fails with returning value 1, the script should fail. So the if condition check should be
510 if verify_log_permissions; then
511 log_failure_msg "Permissions error with vdsm log file"
512 return 1
513 fi
Line 511: log_failure_msg "Permissions error with vdsm log file"
Line 512: return 1
Line 513: fi
Line 514:
--
To view, visit http://gerrit.ovirt.org/9118
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8bd379803b01627d6897992ee8798c6a22195b0f
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Shu Ming <shuming at linux.vnet.ibm.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list