• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/tcl-105/tcl_ext/tcllib/tcllib/modules/ftpd/

Lines Matching +refs:mail +refs:passwd +refs:command

67 	    MAIL       {(mail to user); unimplemented.} \
70 MLFL {(mail file); unimplemented.} \
72 MRCP {(mail recipient); unimplemented.} \
73 MRSQ {(mail recipient scheme question); unimplemented.} \
74 MSAM {(mail send to terminal and mailbox); unimplemented.} \
75 MSND {(mail send to terminal); unimplemented.} \
76 MSOM {(mail send to terminal or mailbox); unimplemented.} \
84 REST {(restart command); unimplemented.} \
151 # command multiple times without resetting already set values
362 foreach file [list /etc/passwd /etc/shadow] {
367 foreach {username passwd uid gid dir sh} [split $line :] {
368 if {[string length $passwd] > 2} {
369 set password($username) $passwd
370 } elseif {$passwd == ""} {
500 state command \
517 # Checks the state of a channel and then reads a command from the
518 # channel if it is not at end of file yet. If there is a command named
519 # ftpd::command::* where '*' is the all upper case name of the command,
520 # then that proc is called to handle the command with the remaining parts
521 # of the command that was read from the channel as arguments.
530 # Runs the appropriate command depending on the state in the state
531 # machine, and the command that is specified.
543 command {
544 gets $sock command
546 if {![regexp {^([^ ]+) (.*)$} $command -> cmd argument]} {
547 if {![regexp {^([^ ]+)$} $command -> cmd]} {
548 # Very bad command syntax.
554 auto_load ::ftpd::command::$cmd
566 } elseif {[info command ::ftpd::command::$cmd] != ""} {
567 Log debug $command
568 ::ftpd::command::$cmd $sock $argument
571 Log error "Unknown command: $cmd"
572 puts $sock "500 Unknown command $cmd"
601 ## User specified a close command so invoke it
615 # command is recieved.
635 # The general filesystem command. Used as an intermediary for filesystem
637 # ::ftpd::Fs command will call out to the fsCmd callback with the
656 # command - The filesystem command (one of dlist, retr, or
683 proc ::ftpd::Fs {command path args} {
690 return [eval [list $cfg(fsCmd) $command $path] $args]
693 # Create a namespace to hold one proc for each ftp command (in upper case
699 namespace eval ::ftpd::command {
703 # ::ftpd::command::ABOR --
705 # Handle the ABOR ftp command. Closes the data socket if it
710 # list - The arguments to the APPE command.
719 proc ::ftpd::command::ABOR {sock list} {
722 puts $sock "225 ABOR command successful."
727 # ::ftpd::command::APPE --
729 # Handle the APPE ftp command. Gets a writable channel for the file
736 # list - The arguments to the APPE command.
745 proc ::ftpd::command::APPE {sock filename} {
763 fcopy $data(sock2) $f -command [list ::ftpd::GetDone $sock $data(sock2) $f ""]
771 # ::ftpd::command::CDUP --
773 # Handle the CDUP ftp command. Change the current working directory to
778 # list - The arguments to the CDUP command.
786 proc ::ftpd::command::CDUP {sock list} {
790 puts $sock "200 CDUP command successful."
794 # ::ftpd::command::CWD --
796 # Handle the CWD ftp command. Change the current working directory.
800 # list - The arguments to the CWD command.
808 proc ::ftpd::command::CWD {sock relativepath} {
812 puts $sock "250 CWD command successful."
818 puts $sock "250 CWD command successful."
823 puts $sock "250 CWD command successful."
827 # ::ftpd::command::DELE --
829 # Handle the DELE ftp command. Delete the specified file.
833 # list - The arguments to the DELE command.
841 proc ::ftpd::command::DELE {sock filename} {
860 # ::ftpd::command::HELP --
862 # Handle the HELP ftp command. Display a list of commands
867 # list - The arguments to the HELP command.
875 proc ::ftpd::command::HELP {sock command} {
878 if {$command != ""} {
879 set command [string toupper $command]
880 if {![info exists ::ftpd::commands($command)]} {
881 puts $sock "502 Unknown command '$command'."
882 } elseif {[info commands ::ftpd::command::$command] == ""} {
883 puts $sock "214 $command\t$::ftpd::commands($command)"
885 puts $sock "214 Syntax: $::ftpd::commands($command)"
892 if {[info commands ::ftpd::command::$commandName] == ""} {
912 # ::ftpd::command::LIST --
914 # Handle the LIST ftp command. Lists the names of the files in the
919 # list - The arguments to the LIST command.
927 proc ::ftpd::command::LIST {sock filename} {
932 # ::ftpd::command::MDTM --
934 # Handle the MDTM ftp command. Prints the modification time of the
939 # list - The arguments to the MDTM command.
947 proc ::ftpd::command::MDTM {sock filename} {
958 # ::ftpd::command::MKD --
960 # Handle the MKD ftp command. Create the specified directory.
964 # list - The arguments to the MKD command.
972 proc ::ftpd::command::MKD {sock filename} {
992 # ::ftpd::command::NOOP --
994 # Handle the NOOP ftp command. Do nothing.
998 # list - The arguments to the NOOP command.
1006 proc ::ftpd::command::NOOP {sock list} {
1008 puts $sock "200 NOOP command successful."
1012 # ::ftpd::command::NLST --
1014 # Handle the NLST ftp command. Lists the full file stat of all of the
1019 # list - The arguments to the NLST command.
1027 proc ::ftpd::command::NLST {sock filename} {
1032 # ::ftpd::command::PASS --
1034 # Handle the PASS ftp command. Check whether the specified user
1042 # list - The arguments to the PASS command.
1051 proc ::ftpd::command::PASS {sock password} {
1090 # ::ftpd::command::PORT --
1092 # Handle the PORT ftp command. Create a new socket with the specified
1097 # list - The arguments to the PORT command.
1105 proc ::ftpd::command::PORT {sock numbers} {
1118 # ::ftpd::command::PWD --
1120 # Handle the PWD ftp command. Prints the current working directory to
1125 # list - The arguments to the PWD command.
1133 proc ::ftpd::command::PWD {sock list} {
1140 # ::ftpd::command::QUIT --
1142 # Handle the QUIT ftp command. Closes the socket.
1146 # list - The arguments to the PWD command.
1154 proc ::ftpd::command::QUIT {sock list} {
1163 # ::ftpd::command::REIN --
1165 # Handle the REIN ftp command. This command terminates a USER, flushing
1172 # list - The arguments to the REIN command.
1181 proc ::ftpd::command::REIN {sock list} {
1191 state command \
1201 # ::ftpd::command::RETR --
1203 # Handle the RETR ftp command. Gets a readable channel for the file
1209 # list - The arguments to the RETR command.
1218 proc ::ftpd::command::RETR {sock filename} {
1237 fcopy $f $data(sock2) -command [list ::ftpd::GetDone $sock $data(sock2) $f ""]
1245 # ::ftpd::command::RMD --
1247 # Handle the RMD ftp command. Remove the specified directory.
1251 # list - The arguments to the RMD command.
1259 proc ::ftpd::command::RMD {sock filename} {
1278 # ::ftpd::command::RNFR --
1280 # Handle the RNFR ftp command. Stores the name of the file to rename
1285 # list - The arguments to the RNFR command.
1294 proc ::ftpd::command::RNFR {sock filename} {
1317 # ::ftpd::command::RNTO --
1319 # Handle the RNTO ftp command. Renames the file specified by 'RNFR' if
1324 # list - The arguments to the RNTO command.
1332 proc ::ftpd::command::RNTO {sock filename} {
1336 puts $sock "500 'RNTO': command not understood."
1360 puts $sock "500 'RNTO': command not understood."
1365 # ::ftpd::command::SIZE --
1367 # Handle the SIZE ftp command. Prints the modification time of the
1372 # list - The arguments to the MDTM command.
1380 proc ::ftpd::command::SIZE {sock filename} {
1391 # ::ftpd::command::STOR --
1393 # Handle the STOR ftp command. Gets a writable channel for the file
1399 # list - The arguments to the STOR command.
1408 proc ::ftpd::command::STOR {sock filename} {
1426 fcopy $data(sock2) $f -command [list ::ftpd::GetDone $sock $data(sock2) $f ""]
1434 # ::ftpd::command::STOU --
1436 # Handle the STOR ftp command. Gets a writable channel for the file
1442 # list - The arguments to the STOU command.
1451 proc ::ftpd::command::STOU {sock filename} {
1476 fcopy $data(sock2) $f -command [list ::ftpd::GetDone $sock $data(sock2) $f $file]
1484 # ::ftpd::command::SYST --
1486 # Handle the SYST ftp command. Print the system information.
1490 # list - The arguments to the SYST command.
1498 proc ::ftpd::command::SYST {sock list} {
1518 # ::ftpd::command::TYPE --
1520 # Handle the TYPE ftp command. Sets up the proper translation mode on
1525 # list - The arguments to the TYPE command.
1534 proc ::ftpd::command::TYPE {sock type} {
1550 # ::ftpd::command::USER --
1552 # Handle the USER ftp command. Store the username, and request a
1557 # list - The arguments to the USER command.
1565 proc ::ftpd::command::USER {sock username} {
1581 # The fcopy command callback for both the RETR and STOR calls. Called
1624 # Handle the NLST and LIST ftp commands. Shared command to do the
1701 # command - The filesystem command (one of dlist, retr, or
1727 proc ::ftpd::fsFile::fs {command path args} {
1747 switch -exact -- $command {
1851 puts $outchan "250 DELE command successful."
1901 puts $sock "250 RNTO command successful."
1912 puts $outchan "250 RMD command successful."
1927 error "Unknown command \"$command\""
2003 ## Implementation of passive command
2005 proc ::ftpd::command::PASV {sock argument} {