Skip to content

Commit 7affbb1

Browse files
DaanHooglandvdombrovskivishesh92sureshanaparti
authored
protect against null-path (#8915)
Co-authored-by: Vladimir Dombrovski <vladimir.dombrovski@bso.co> Co-authored-by: Vishesh <vishesh92@gmail.com> Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
1 parent d4a5459 commit 7affbb1

File tree

2 files changed

+5
-2
lines changed
  • plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource
  • systemvm/debian/etc/logrotate.d

2 files changed

+5
-2
lines changed

plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3066,7 +3066,10 @@ protected void setVAppPropertiesToConfigSpec(VmConfigInfo vAppConfig,
30663066
}
30673067

30683068
private String appendFileType(String path, String fileType) {
3069-
if (path.toLowerCase().endsWith(fileType.toLowerCase())) {
3069+
if (StringUtils.isBlank(path)) {
3070+
throw new CloudRuntimeException("No path given, cannot append filetype " + fileType);
3071+
}
3072+
if (fileType == null || path.toLowerCase().endsWith(fileType.toLowerCase())) {
30703073
return path;
30713074
}
30723075

systemvm/debian/etc/logrotate.d/haproxy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
notifempty
55
maxsize 10M
66
postrotate
7-
/bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true
7+
/usr/lib/rsyslog/rsyslog-rotate
88
endscript
99
}

0 commit comments

Comments
 (0)