Add strip to protected_* methods

GSoC/Meterpreter_Web_Console
Carter Brainerd 2018-04-17 11:04:08 -04:00 committed by GitHub
parent bf8c62f27c
commit d91ef7c9dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -277,7 +277,7 @@ module System
# @return [Boolean]
#
def protected_hardlinks?
read_file('/proc/sys/fs/protected_hardlinks').to_s.eql? '1'
read_file('/proc/sys/fs/protected_hardlinks').to_s.strip.eql? '1'
rescue
raise 'Could not determine protected_hardlinks status'
end
@ -287,7 +287,7 @@ module System
# @return [Boolean]
#
def protected_symlinks?
read_file('/proc/sys/fs/protected_symlinks').to_s.eql? '1'
read_file('/proc/sys/fs/protected_symlinks').to_s.strip.eql? '1'
rescue
raise 'Could not determine protected_symlinks status'
end
@ -318,4 +318,4 @@ module System
end # System
end # Linux
end # Post
end # Msf
end # Msf