Ignore change "Set SO_PASSCRED on the uevent socket." in favor of change
in internal tree.
Change-Id: Ibdf7cf1e1d0ba177d9de813baa6481ddd31d5d9c
diff --git a/DirectVolume.cpp b/DirectVolume.cpp
index 3191cc7..54da964 100644
--- a/DirectVolume.cpp
+++ b/DirectVolume.cpp
@@ -186,6 +186,11 @@
part_num = 1;
}
+ if (part_num > MAX_PARTITIONS || part_num < 1) {
+ SLOGW("Invalid 'PARTN' value");
+ part_num = 1;
+ }
+
if (part_num > mDiskNumParts) {
mDiskNumParts = part_num;
}
diff --git a/NetlinkManager.cpp b/NetlinkManager.cpp
index 9fb86ae..29cd88e 100644
--- a/NetlinkManager.cpp
+++ b/NetlinkManager.cpp
@@ -63,9 +63,13 @@
return -1;
}
- if (setsockopt(mSock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0 ||
- setsockopt(mSock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on)) < 0) {
- SLOGE("Unable to set uevent socket options: %s", strerror(errno));
+ if (setsockopt(mSock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0) {
+ SLOGE("Unable to set uevent socket SO_RECBUFFORCE option: %s", strerror(errno));
+ return -1;
+ }
+
+ if (setsockopt(mSock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on)) < 0) {
+ SLOGE("Unable to set uevent socket SO_PASSCRED option: %s", strerror(errno));
return -1;
}