BUG-8203: update Netty isRoot method name
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / controller / config / yang / bgp / rib / impl / BGPPeerAcceptorModule.java
index 8b207612115c2c43585b3da51dba66f1c8ca07e6..70423c8c6989abcd2f45cb607810fc435688ab7e 100644 (file)
@@ -45,7 +45,7 @@ public class BGPPeerAcceptorModule extends org.opendaylight.controller.config.ya
     @Override
     public void customValidation() {
         // check if unix root user
-        if (!PlatformDependent.isWindows() && !PlatformDependent.isRoot() && getBindingPort().getValue() < PRIVILEGED_PORTS) {
+        if (!PlatformDependent.isWindows() && !PlatformDependent.maybeSuperUser() && getBindingPort().getValue() < PRIVILEGED_PORTS) {
             throw new AccessControlException("Unable to bind port " + getBindingPort().getValue() + " while running as non-root user.");
         }
         // Try to parse address