/usr/lib/ruby/vendor_ruby/net/sftp/protocol.rb is in ruby-net-sftp 1:2.1.2-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | require 'net/sftp/protocol/01/base'
require 'net/sftp/protocol/02/base'
require 'net/sftp/protocol/03/base'
require 'net/sftp/protocol/04/base'
require 'net/sftp/protocol/05/base'
require 'net/sftp/protocol/06/base'
module Net; module SFTP
# The Protocol module contains the definitions for all supported SFTP
# protocol versions.
module Protocol
# Instantiates and returns a new protocol driver instance for the given
# protocol version. +session+ must be a valid SFTP session object, and
# +version+ must be an integer. If an unsupported version is given,
# an exception will be raised.
def self.load(session, version)
case version
when 1 then V01::Base.new(session)
when 2 then V02::Base.new(session)
when 3 then V03::Base.new(session)
when 4 then V04::Base.new(session)
when 5 then V05::Base.new(session)
when 6 then V06::Base.new(session)
else raise NotImplementedError, "unsupported SFTP version #{version.inspect}"
end
end
end
end; end
|