128件ヒット
[1-100件を表示]
(0.080秒)
種類
- モジュール関数 (66)
- インスタンスメソッド (40)
- 特異メソッド (11)
- 文書 (11)
ライブラリ
- ビルトイン (77)
- pathname (11)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) -
webrick
/ utils (11)
クラス
- File (11)
-
File
:: Stat (11) - Pathname (11)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6)
モジュール
- FileTest (11)
- Kernel (22)
-
Process
:: Sys (22) -
WEBrick
:: Utils (11)
検索結果
先頭5件
-
Process
:: Sys . # setgid(id) -> nil (18217.0) -
システムコールの setgid(2) を呼びます。
...システムコールの setgid(2) を呼びます。
@param id システムコールの引数を整数で指定します。
@raise NotImplementedError システムコールが現在のプラットフォームで提供されていない場合に発生します。
@raise Errno::EXXX システム... -
FileTest
. # setgid?(file) -> bool (6235.0) -
ファイルが setgid(2) されている時に真を返 します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
...ファイルが setgid(2) されている時に真を返
します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
@param file ファイル名を表す文字列か IO オブジェクトを......指定します。
//emlist[例][ruby]{
require 'fileutils'
IO.write("testfile", "")
FileUtils.chmod("g+s", "testfile")
FileTest.setgid?("testfile") # => true
FileUtils.chmod("g-s", "testfile")
FileTest.setgid?("testfile") # => false
//}... -
File
:: Stat # setgid? -> bool (6223.0) -
setgidされている時に真を返します。
...setgidされている時に真を返します。
//emlist[][ruby]{
Dir.glob("/usr/sbin/*") {|bd|
if File::Stat.new(bd).setgid?
puts bd
end
}
#例
#...
#=> /usr/sbin/postqueue
#...
//}... -
Pathname
# setgid? -> bool (6223.0) -
FileTest.setgid?(self.to_s) と同じです。
...FileTest.setgid?(self.to_s) と同じです。
@see FileTest.#setgid?... -
File
. setgid?(path) -> bool (6217.0) -
FileTest.#setgid? と同じです。
...FileTest.#setgid? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
Shell
# setgid?(file) -> bool (6207.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setgid?... -
Shell
:: CommandProcessor # setgid?(file) -> bool (6207.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setgid?... -
Shell
:: Filter # setgid?(file) -> bool (6207.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setgid?... -
Kernel
. # test(cmd , file) -> bool | Time | Integer | nil (118.0) -
単体のファイルでファイルテストを行います。
...する
: ?z
ファイルサイズが 0 である
: ?s
ファイルサイズが 0 でない (ファイルサイズを返す、0 ならば nil) -> Integer|nil
: ?f
ファイルはプレーンファイルである
: ?d
ファイルはディレクトリである
: ?l
ファイルは......に setgid ビットがセットされている
: ?k
ファイルに sticky ビットがセットされている
: ?M
ファイルの最終更新時刻を返す -> Time
: ?A
ファイルの最終アクセス時刻を返す -> Time
: ?C
ファイルの inode 変更時刻を返す -> T......ime
//emlist[例][ruby]{
IO.write("testfile", "test")
test("r", "testfile") # => true
test("s", "testfile") # => 4
test("M", "testfile") # => 2018-03-31 07:38:40 +0900
//}... -
WEBrick
:: Utils . # su(user) -> () (116.0) -
指定されたユーザに Process::Sys.#setuid, Process::Sys.#setgid します。
...指定されたユーザに Process::Sys.#setuid,
Process::Sys.#setgid します。
setuid できないプラットフォームでは警告を表示し、何もしません。
@param user ユーザを指定します。... -
セキュリティモデル (114.0)
-
セキュリティモデル RubyにはCGI等のプログラミングを安全に行うことを助ける為に、セキュリティ 機構が備わっています。
...= 1
}
th.join
p $SAFE # => 0
//}
* $SAFE の値を現在の値より小さく変更する事はできない
//emlist{
$ ruby -e '$SAFE = 1; $SAFE = 0'
-e:1: tried to downgrade safe level from 1 to 0 (SecurityError)
//}
原則として、各セキュリティレベルにはそれ以下......す。
===== 汚染されるオブジェクト
* IOや環境変数、コマンドライン引数(ARGV)から得られた文字列
$ ruby -e 'p ARGV[0].tainted?' hoge
true
環境変数PATHだけは例外で、値に危険なパスを含む場合のみ汚染されます。
ここ......ない
(スクリプトがsetgid, setuidされている時も同様)
* 以下のスイッチを使用できない
(スクリプトがsetgid, setuidされている時も同様)
//emlist{
-s -S -e -r -i -I -x
//}
* setuid, setgid されたスクリプトは $SAFE = 1...