Re: почему глючит ls
On Sun, 24 Jan 2016, Alex Kicelew wrote: On 01/24/16 00:55, dimas wrote: да уж, прикол... а кто-нибудь может объяснить, почему в случае с touch "-l" аргумент в кавычках все равно парсится как ключ? Кавычки видит шелл. если сказать touch "-1 -2", шелл передаст тачу один параметр с пробелом посередине. А тач уже увидит один параметр безо всяких кавычек, начинающийся с дефиса, и начнет его по этой причине парсить как флаг. Могу еще добавить для тех кто С немножко знает. Посмотрите > man 3 getopt В секции EXAMPLE есть работающие программы с примером разбора аргументов. На практике, обычно эти функции и используют для анализа опций командной строки. Можно скомпилировать, поиграться и разобраться, что делает шелл и что видит программа на входе. Ю.
[DONE] wml://security/2009/dsa-1{856,943,884,955,916,923,825,772,738,947,734,876,948,719,841}.wml
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 - --- english/security/2009/dsa-1719.wml2014-04-30 13:16:18.0 +0600 +++ russian/security/2009/dsa-1719.wml 2016-01-24 13:16:46.360007984 +0500 @@ -1,24 +1,25 @@ - -design flaw +#use wml::debian::translation-check translation="1.3" maintainer="Lev Lamberov" +оÑибка ÑазÑабоÑки - -Martin von Gagern discovered that GNUTLS, an implementation of the - -TLS/SSL protocol, handles verification of X.509 certificate chains - -incorrectly if a self-signed certificate is configured as a trusted - -certificate. This could cause clients to accept forged server - -certificates as genuine. (https://security-tracker.debian.org/tracker/CVE-2008-4989;>CVE-2008-4989) +ÐаÑÑин Ñон ÐагеÑн обнаÑÑжил, ÑÑо GNUTLS, ÑеализаÑÐ¸Ñ Ð¿ÑоÑокола +TLS/SSL, некоÑÑекÑно вÑполнÑÐµÑ Ð¿ÑовеÑÐºÑ ÑепоÑек ÑеÑÑиÑикаÑов +X.509 в ÑлÑÑае, еÑли ÑамозавеÑеннÑй ÑеÑÑиÑÐ¸ÐºÐ°Ñ Ñказан как довеÑеннÑй +ÑеÑÑиÑикаÑ. ÐÑо Ð¼Ð¾Ð¶ÐµÑ Ð¿ÑиводиÑÑ Ðº ÑомÑ, ÑÑо клиенÑÑ Ð±ÑдÑÑ Ð¿ÑинимаÑÑ Ð¿Ð¾Ð´Ð´ÐµÐ»ÑнÑе ÑеÑвеÑнÑе +ÑеÑÑиÑикаÑÑ Ð·Ð° наÑÑоÑÑие. (https://security-tracker.debian.org/tracker/CVE-2008-4989;>CVE-2008-4989) - -In addition, this update tightens the checks for X.509v1 certificates - -which causes GNUTLS to reject certain certificate chains it accepted - -before. (In certificate chain processing, GNUTLS does not recognize - -X.509v1 certificates as valid unless explicitly requested by the - -application.) +ÐÑоме Ñого, данное обновление ÑлÑÑÑÐ°ÐµÑ Ð¿ÑовеÑки ÑеÑÑиÑикаÑов X.509v1, +ÑÑо пÑÐ¸Ð²Ð¾Ð´Ð¸Ñ Ðº ÑомÑ, ÑÑо GNUTLS оÑклонÑÐµÑ Ð¾Ð¿ÑеделÑннÑе ÑепоÑки ÑеÑÑиÑикаÑов, пÑинимаемÑÑ +Ñанее. (Ркоде обÑабоÑки ÑепоÑек ÑеÑÑиÑикаÑов GNUTLS не ÑаÑпознаÑÑ ÑеÑÑиÑикаÑÑ +X.509v1 как пÑавилÑнÑе ÑеÑÑиÑикаÑÑ Ð´Ð¾ ÑÐµÑ Ð¿Ð¾Ñ, пока об ÑÑом не поÑÑÑÐ¿Ð¸Ñ ÑвнÑй запÑÐ¾Ñ Ð¾Ñ +пÑиложениÑ.) - -For the stable distribution (etch), this problem has been fixed in - -version 1.4.4-3+etch3. +Ð ÑÑабилÑном вÑпÑÑке (etch) ÑÑа пÑоблема бÑла иÑпÑавлена в +веÑÑии 1.4.4-3+etch3. - -For the unstable distribution (sid), this problem has been fixed in - -version 2.4.2-3 of the gnutls26 package. +РнеÑÑабилÑном вÑпÑÑке (sid) ÑÑа пÑоблема бÑла иÑпÑавлена в +веÑÑии 2.4.2-3 пакеÑа gnutls26. - -We recommend that you upgrade your gnutls13 packages. +РекомендÑеÑÑÑ Ð¾Ð±Ð½Ð¾Ð²Ð¸ÑÑ Ð¿Ð°ÐºÐµÑÑ gnutls13. # do not modify the following line - --- english/security/2009/dsa-1734.wml2009-03-06 20:04:30.0 +0500 +++ russian/security/2009/dsa-1734.wml 2016-01-24 12:49:36.911508456 +0500 @@ -1,25 +1,26 @@ - -programming error +#use wml::debian::translation-check translation="1.1" maintainer="Lev Lamberov" +оÑибка пÑогÑаммиÑÐ¾Ð²Ð°Ð½Ð¸Ñ - -b.badrignans discovered that OpenSC, a set of smart card utilities, - -could stores private data on a smart card without proper access - -restrictions. - - - -Only blank cards initialised with OpenSC are affected by this problem. - -This update only improves creating new private data objects, but cards - -already initialised with such private data objects need to be - -modified to repair the access control conditions on such cards. - -Instructions for a variety of situations can be found at the OpenSC - -web site: http://www.opensc-project.org/security.html - - - -The oldstable distribution (etch) is not affected by this problem. +b.badrignans обнаÑÑжил, ÑÑо OpenSC, Ð½Ð°Ð±Ð¾Ñ ÑÑÐ¸Ð»Ð¸Ñ Ð´Ð»Ñ ÑабоÑÑ Ñо ÑмаÑÑ-каÑÑами, +Ð¼Ð¾Ð¶ÐµÑ Ñ ÑаниÑÑ Ð»Ð¸ÑнÑе даннÑе на ÑмаÑÑ-каÑÑе без должного огÑаниÑÐµÐ½Ð¸Ñ Ð¿Ñав +доÑÑÑпа. + +ÐÑой пÑоблеме подвеÑжен ÑолÑко пÑÑÑÑе каÑÑÑ, иниÑиализиÑованнÑе Ñ Ð¿Ð¾Ð¼Ð¾ÑÑÑ OpenSC. +Ðанное обновление лиÑÑ ÑлÑÑÑÐ°ÐµÑ Ñоздание новÑÑ Ð¾Ð±ÑекÑов Ñ Ð»Ð¸ÑнÑми даннÑми, каÑÑÑ, +коÑоÑÑе Ñже бÑли иниÑиализиÑованÑ, Ð´Ð¾Ð»Ð¶Ð½Ñ Ð±ÑÑÑ +Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ñ Ñ ÑелÑÑ Ð¸ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ ÑÑловий ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð¾ÑÑÑпом. +ÐнÑÑÑÑкÑии к дейÑÑÐ²Ð¸Ñ Ð² ÑазлиÑнÑÑ ÑиÑÑаÑиÑÑ Ð¼Ð¾Ð¶Ð½Ð¾ найÑи на веб-ÑайÑе +OpenSC: http://www.opensc-project.org/security.html + +ÐÑедÑдÑÑий ÑÑабилÑнÑй вÑпÑÑк (etch) не подвеÑжен
Re: почему глючит ls
On 21.01.2016 23:15, Melleus wrote: Не могу понять, что происходит. 1. Так - работает: me@machine:~/Загрузки/ > ls 0*.pdf 0470568135.pdf 0521191130 2.pdf 055-059.pdf 05.pdf 065-067.pdf 2. А так - не работает: me@machine:~/Загрузки/ > ls *.pdf ls: неверный ключ — «�� По команде «ls --help» можно получить дополнительную информацию. Что я делаю не так? Спасибо заранее. потому что есть файл, имя которого начинается с -. писать ls -- *.pdf, -- прекращает обработку ключей.
Re: почему глючит ls
On 2016-01-23, dimas wrote: > да уж, прикол... а кто-нибудь может объяснить, почему в случае с touch "-l" > аргумент в кавычках все равно парсится как ключ? Откройте POSIX: http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html 2. Shell Command Language The shell operates according to the following general overview of operations. The specific details are included in the cited sections of this chapter. The shell reads its input from a file (see sh), from the -c option or from the system() and popen() functions defined in the System Interfaces volume of IEEE Std 1003.1-2001. If the first line of a file of shell commands starts with the characters "#!", the results are unspecified. The shell breaks the input into tokens: words and operators; see Token Recognition. The shell parses the input into simple commands (see Simple Commands) and compound commands (see Compound Commands). The shell performs various expansions (separately) on different parts of each command, resulting in a list of pathnames and fields to be treated as a command and arguments; see Word Expansions. The shell performs redirection (see Redirection) and removes redirection operators and their operands from the parameter list. The shell executes a function (see Function Definition Command), built-in (see Special Built-In Utilities), executable file, or script, giving the names of the arguments as positional parameters numbered 1 to n, and the name of the command (or in the case of a function within a script, the name of the script) as the positional parameter numbered 0 (see Command Search and Execution). The shell optionally waits for the command to complete and collects the exit status (see Exit Status for Commands). Т.е. при разборе строки происходит несколько шагов. С ``touch "-l"`` мы на шаге: The shell breaks the input into tokens: words and operators; see Token Recognition. Смотрим по ссылке: 2.3 Token Recognition If the current character is backslash, single-quote, or double-quote ( '\', '", or ' )' and it is not quoted, it shall affect quoting for subsequent characters up to the end of the quoted text. The rules for quoting are as described in Quoting. During token recognition no substitutions shall be actually performed, and the result token shall contain exactly the characters that appear in the input (except for joining), unmodified, including any embedded or enclosing quotes or substitution operators, between the quote mark and the end of the quoted text. The token shall not be delimited by the end of the quoted field. If the current character is an unquoted , any token containing the previous character is delimited and the current character shall be discarded. If the previous character was part of a word, the current character shall be appended to that word. Вот и обьяснение. Кавычки попадают в shell, обрабатываются и не доходят до команды. Т.е. кавычки - это особенность shell, команда вообще ни при чем. В разных контекстах выполняются разные шаги. Стоит раз разобраться. Например ``Parameter Expansion`` не делается в одинарных кавычках. Для проверки на пустоту важно взять параметер в двойные кавычки. built-in Bash test как то отрабатывает: $ [ -z -a -z ] $ x= $ [ -z $x -a -z $x ] В GNU coreutils это не срабатывает: bash# /usr/bin/\[ -z -a -z ] /usr/bin/[: extra argument ‘-z’ bash# /usr/bin/\[ -z $x -a -z $x ] /usr/bin/[: extra argument ‘-z’ В FreeBSD sh также не позволяет: $ [ -z -a -z ] [: -a: unexpected operator $ [ -z $x -a -z $x ] [: -a: unexpected operator Расширение Bash работает двояко: $ [[ -z ]] bash: unexpected argument `]]' to conditional unary operator bash: syntax error near `]]' тогда как это сработает: bash# [[ -z $x ]] Признаюсь что у меня нет 100% гарантии с обьяснения мануала почему оно работает. Прямо так не сказано. bash(1): [[ expression ]] Return a status of 0 or 1 depending on the evaluation of the conditional expression expression. Expressions are composed of the primaries described below under CONDITIONAL EXPRESSIONS. Word splitting and pathname expansion are not performed on the words between the [[ and ]]; tilde expansion, parameter and variable expansion, arithmetic expansion, command substitution, process substitution, and quote removal are performed. Conditional operators such as -f must be unquoted to be recog‐ nized as primaries. See the description of the test builtin command (section SHELL BUILTIN COMMANDS below) for the handling of parameters (i.e. missing parameters). Т.е. сделается пустая подстановка вместо $x, но место быдет считаться занятым потому что не происходит Word splitting? Переносимый
Tidy validation failed
*** /srv/www.debian.org/www/blends/index.ru.html line 112 column 5 - Warning: attribute "href" lacks value line 119 column 5 - Warning: attribute "href" lacks value line 126 column 5 - Warning: attribute "href" lacks value line 133 column 5 - Warning: attribute "href" lacks value -- You received this mail for the language code ru. Please edit webwml/english/devel/website/validation.data if this is not accurate. Please also update webwml/english/devel/website/ with the new coordinator(s) data.