Index: head/pt_BR.ISO8859-1/articles/pam/article.xml =================================================================== --- head/pt_BR.ISO8859-1/articles/pam/article.xml (revision 52676) +++ head/pt_BR.ISO8859-1/articles/pam/article.xml (revision 52677) @@ -1,1333 +1,1337 @@
- Módulos de Autenticação Plugáveis - + + Módulos de Autenticação Plugáveis Esse artigo descreve princípios subjacentes e mecanismos da biblioteca de Módulos de Autenticação Plugáveis (PAM), e explica como configurar, como integrar com outras aplicações e como escrever novos módulos. 2001 2002 2003 Networks Associates Technology, Inc. - Dag-ErlingSmørgravContributed by + Dag-Erling Smørgrav Contributed by This article was written for the FreeBSD Project by ThinkSec AS and Network Associates Laboratories, the Security Research Division of Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 (CBOSS), as part of the DARPA CHATS research program. FreeBSD is a registered trademark of the FreeBSD Foundation. Linux is a registered trademark of Linus Torvalds. Motif, OSF/1, and UNIX are registered trademarks and IT DialTone and The Open Group are trademarks of The Open Group in the United States and other countries. Sun, Sun Microsystems, Java, Java Virtual Machine, JDK, JRE, JSP, JVM, Netra, OpenJDK, Solaris, StarOffice, SunOS and VirtualBox are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this document, and the FreeBSD Project was aware of the trademark claim, the designations have been followed by the or the ® symbol. $FreeBSD$
Introdução A biblioteca dos Módulos de Autenticação Plugáveis (PAM) é uma API generalizada para serviços relacionados com autenticações as quais permitem ao administrador de sistema adicionar um novo método de autenticação simplesmente pela instalação de um novo módulo PAM, e modificar a política de autenticação pela edição do arquivo de configuração. O PAM foi definido e desenvolvido em 1995 por Vipin Samar e Charlie Lai da Sun Microsystems, e não teve muitas mudanças até hoje. Em 1997, o Open Group publicou a especificação preliminar do X/Open Single Sign-on (XSSO), a qual padroniza a API do PAM e adiciona extensões para autenticação única ou integrada. No momento da redação deste documento, esta especificação ainda não tinha sido adotada como padrão. Apesar deste artigo focar primariamente no sistema FreeBSD 5.x, o qual usa o OpenPAM, ele poderá ser igualmente aplicado ao FreeBSD 4.x, o qual usa o Linux-PAM, e a outros systemas operacionais, tais como o Linux e o Solaris.
Termos e convenções
Definições A terminologia em torno do PAM é bastante confusa. Nem o artigo original de Neither Samar e Lai nem a especificação original do XSSO fizeram algum esforço para definir formalmente os termos de vários atores e entidades envolvidas no PAM, e os termos que eles usam (mas não definem) são algumas vezes duvidosos ou ambíguos. A primeira tentativa de estabelecer uma terminologia consistente e não ambígua foi feita no artigo escrito por Andrew G. Morgan (autor do Linux-PAM) em 1999. A escolha da terminologia de Morgan foi um grande avanço, mas na opinião deste autor, não é perfeita. O que segue é uma tentativa, fortemente inspirada por Morgan, de definir termos precisos e não ambíguos para todos os atores e entidades envolvidas no PAM. conta (account) Um conjunto de credenciais que o requerente está solicitando ao mediador. requerente (applicant) Usuário ou entidade que solicita autenticação Mediador (arbitrator) Usuário ou entidade a qual tem privilégios necessários para verificar as credenciais do requerente e autorizar ou não a solicitação chain Uma sequência de módulos que irá ser chamada em resposta a uma solicitação do PAM. A chain inclui informações sobre a ordem a qual invocar os módulos, quais argumentos foram passados e como interpretar os resultados. client A aplicação responsável por inicializar uma solicitação de autenticação em nome do requerente para obter as informações necessárias da autenticação dele. recursos Um dos quatro grupos básicos de funcionalidades fornecidos pelo PAM: autenticação, gerenciamento de conta, gerenciamento de sessão e atualização de token de autenticação. módulo Uma coleção de uma ou mais funções relacionadas implementando um recurso de autenticação específico, reunidas em um único arquivo binário (normalmente carregável dinamicamente) e identificadas por um único nome. política O conjunto completo de instruções de configuração que descrevem como lidar com solicitações do PAM para um serviço específico. Uma política normalmente consiste em quatro chains, uma para cada recurso, embora alguns serviços não utilizem os quatro recursos. servidor O aplicativo agindo em nome do mediador para conversar com o cliente, recuperar informações de autenticação, verificar as credenciais do requerente e conceder ou negar solicitações. serviço Classe de servidores que provêm recursos similares ou relacionados e requerem autenticação similar. As políticas do PAM são definidas por serviço, portanto, todos os servidores que reivindicam o mesmo nome de serviço estarão sujeitos à mesma política. sessão O contexto com o qual serviços são apresentados para o requerente pelo servidor. Um dos quatro recursos do PAM, gerenciamento de sessão, é concedido exclusivamente configurando e derrubando esse contexto. token Um pedaço de informação associada à conta, como uma senha sendo uma palavra ou uma frase, que o solicitante deve fornecer para provar sua identidade. transação Uma sequência de solicitações do mesmo requerente para a mesma instância do mesmo servidor, começando com a configuração de autenticação e sessão e terminando com a desmontagem da sessão.
Exemplos de uso Esta seção tem como objetivo ilustrar os significados de alguns dos termos definidos acima por meio de alguns exemplos simples.
O cliente e o servidor são um Este exemplo simples mostra alice usando su1 para se tornar root. -% whoami + % whoami alice % ls -l `which su` -r-sr-xr-x 1 root wheel 10744 Dec 6 19:06 /usr/bin/su % su - Password: xi3kiune # whoami -root - +root O requerente é alice. A conta é root. O processo su1 é ao mesmo tempo, o cliente e o servidor. O token de autenticação é xi3kiune. O mediador é root, e é por isso que su1 possui setuid para root.
O cliente e o servidor são separados O exemplo abaixo mostra eve tentar iniciar uma conexão ssh1 com login.example.com, solicitar para efetuar login como bob e ter exito. Bob deveria ter escolhido uma senha melhor! -% whoami + % whoami eve % ssh bob@login.example.com bob@login.example.com's password: god Last login: Thu Oct 11 09:52:57 2001 from 192.168.0.1 Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.4-STABLE (LOGIN) #4: Tue Nov 27 18:10:34 PST 2001 Welcome to FreeBSD! % O requerente é eve. O cliente é o processo ssh1 de Eve. O servidor é o processo sshd8 em login.example.com A conta é bob. O token de autenticação é god. Embora isso não seja mostrado neste exemplo, o mediador é root.
Exemplo de política A seguir, a política padrão do FreeBSD para sshd: -sshd auth required pam_nologin.so no_warn + sshd auth required pam_nologin.so no_warn sshd auth required pam_unix.so no_warn try_first_pass sshd account required pam_login_access.so sshd account required pam_unix.so sshd session required pam_lastlog.so no_fail sshd password required pam_permit.so Esta política se aplica ao serviço sshd (que não é necessariamente restrito ao servidor sshd8). auth, account, session e password são recursos. pam_nologin.so, pam_unix.so, pam_login_access.so, pam_lastlog.so e pam_permit.so são módulos. Fica claro neste exemplo que o pam_unix.so fornece pelo menos dois recursos (autenticação e gerenciamento de conta).
PAM Essencial
- Recursos e primitivos + Recursos e Primitivas A API do PAM oferece seis primitivas de autenticação diferentes agrupadas em quatro recursos, descritos abaixo. auth Autenticação. Este recurso se preocupa em autenticar o requerente e estabelecer as credenciais da conta. Ele fornece duas primitivas: pam_authenticate3 autentica o requerente, geralmente solicitando um token de autenticação e comparando-o com um valor armazenado em um banco de dados ou obtido de um servidor de autenticação. pam_setcred3 estabelece credenciais de conta, como ID de usuário, associação de grupo e limites de recursos. account Gerenciamento de contas. Esse recurso lida com problemas de disponibilidade de conta não relacionados à autenticação, como restrições de acesso com base na hora do dia ou na carga de trabalho do servidor. Ele fornece uma única primitiva: pam_acct_mgmt3 verifica se a conta solicitada está disponível. session Gerenciamento de sessão. Esse recurso lida com tarefas associadas à configuração e desmontagem da sessão, como a contabilização de login. Ele fornece duas primitivas: pam_open_session3 executa tarefas associadas à configuração da sessão: adiciona uma entrada nos bancos de dados utmp e wtmp, inicia um agente SSH, etc. pam_close_session3 executa tarefas associadas à desmontagem da sessão: adiciona uma entrada nos bancos de dados utmp e wtmp, pare o agente SSH, etc. password Gerenciamento de senhas. Esse recurso é usado para alterar o token de autenticação associado a uma conta, porque expirou ou porque o usuário deseja alterá-lo. Ele fornece uma única primitiva: pam_chauthtok3 altera o token de autenticação, opcionalmente, verificando se é suficientemente difícil de adivinhar, se não foi usado anteriormente etc.
Módulos Módulos são um conceito muito central no PAM; afinal, eles são os M no PAM. Um módulo PAM é um código de programa autocontido que implementa as primitivas em uma ou mais instalações para um mecanismo específico; possíveis mecanismos para o recurso de autenticação, por exemplo, incluem os bancos de dados de senhas UNIX, NIS, LDAP e Radius.
Nomeação de Módulos O FreeBSD implementa cada mecanismo em um único módulo, chamado pam_mechanism.so (por exemplo, pam_unix.so para o mecanismo UNIX. Outras implementações às vezes possuem módulos separados para instalações separadas e incluem o nome do recurso, bem como o nome do mecanismo no nome do módulo. Para citar um exemplo, Solaris tem um módulo pam_dial_auth.so.1 que é comumente usado para autenticar usuários de conexões discadas.
Versionando Módulos A implementação original do PAM no FreeBSD, baseada no Linux-PAM, não utilizou números de versão para os módulos PAM. Isso normalmente causaria problemas com aplicativos legados, que poderiam estar vinculados a versões mais antigas das bibliotecas do sistema, pois não havia como carregar uma versão correspondente dos módulos necessários. O OpenPAM, por outro lado, procura por módulos que possuam o mesmo número de versão que a biblioteca PAM (atualmente 2), e só retorna a um módulo não versionado se nenhum módulo versionado puder ser carregado. Assim, os módulos legados podem ser fornecidos para aplicativos legados, permitindo que novos aplicativos (ou recém-construídos) aproveitem os módulos mais recentes. Embora os módulos PAM do Solaris normalmente tenham um número de versão, eles não são realmente versionados, porque o número é uma parte do nome do módulo e deve ser incluído na configuração.
- Chains e Políticas + Cadeias e Políticas Quando um servidor inicia uma transação PAM, a biblioteca PAM tenta carregar uma política para o serviço especificado na chamada pam_start3. A política especifica como as solicitações de autenticação devem ser processadas e definidas em um arquivo de configuração. Este é o outro conceito central no PAM: a possibilidade de o administrador ajustar a política de segurança do sistema (no sentido mais amplo da palavra) simplesmente editando um arquivo de texto. Uma política consiste em quatro cadeias, uma para cada uma dos quatro recursos do PAM. Cada chain é uma sequência de instruções de configuração, cada uma especificando um módulo para invocar, alguns parâmetros (opcionais) para passar para o módulo e um sinalizador de controle que descreve como interpretar o código de retorno do módulo. Entender os sinalizadores de controle é essencial para entender os arquivos de configuração do PAM. Existem quatro diferentes flags de controle: binding Se o módulo tiver exito e nenhum módulo anterior na chain tiver falhado, a chain será encerrada imediatamente e a solicitação será concedida. Se o módulo falhar, o resto da chain é executado, mas a solicitação é negada no final. Esta flag de controle foi introduzida pela Sun no Solaris9 (SunOS 5.9), e também é suportado pelo OpenPAM. required Se o módulo tiver exito, o restante da chain será executada e a solicitação será concedida, a menos que algum outro módulo falhe. Se o módulo falhar, o restante da chain também será executado, mas a solicitação será negada no final. requisite Se o módulo for tiver exito, o restante da chain será executado e a solicitação será concedida, a menos que algum outro módulo falhe. Se o módulo falhar, a chain será encerrada imediatamente e a solicitação será negada. sufficient Se o módulo tiver exito e nenhum módulo anterior na chain tiver falhado, a chain será encerrada imediatamente e a solicitação será concedida. Se o módulo falhar, o módulo será ignorado e o resto da chain será executado. Como a semântica dessa flag pode ser um pouco confusa, especialmente quando ela é usada para o último módulo em uma chain, é recomendado que a flag de controle binding seja usada em seu lugar, se a implementação o suportar. optional O módulo é executado, mas seu resultado é ignorado. Se todos os módulos em uma chain estiverem marcados como optional, todas as solicitações serão sempre concedidas. Quando um servidor invoca uma das seis primitivas PAM, o PAM recupera a chain para o recurso ao qual a primitiva pertence, e invoca cada um dos módulos listados na chain, na ordem em que estão listados, até chegar ao fim ou determina que nenhum processamento adicional é necessário (porque um módulo binding ou sufficient teve exito, ou porque um módulo requisite falhou.) O pedido é concedido se e somente se pelo menos um módulo foi chamado e todos os módulos não opcionais tiveram exito. Note que é possível, embora não muito comum, ter o mesmo módulo listado várias vezes na mesma chain. Por exemplo, um módulo que procura nomes de usuário e senhas em um servidor de diretório pode ser chamado várias vezes com parâmetros diferentes, especificando diferentes servidores de diretórios para contato. O PAM trata diferentes ocorrências do mesmo módulo na mesma chain de módulos diferentes e não relacionados.
Transações O ciclo de vida de uma transação típica do PAM é descrito abaixo. Observe que, se qualquer uma dessas etapas falhar, o servidor deverá informar uma mensagem de erro adequada ao cliente e anular a transação. Se necessário, o servidor obtém as credenciais do mediador por meio de um mecanismo independente do PAM - mais comumente em virtude de ter sido iniciado por root ou de ser setuid root. O servidor chama pam_start3 para inicializar a biblioteca PAM, especificar seu nome de serviço e a conta de destino e registrar uma função de conversação adequada. O servidor obtém várias informações relacionadas à transação (como o nome de usuário do requerente e o nome do host no qual o cliente é executado) e o envia ao PAM usando pam_set_item3. O servidor chama pam_authenticate3 para autenticar o requerente. O servidor chama pam_acct_mgmt3 para verificar se a conta solicitada está disponível e é válida. Se a senha estiver correta mas expirar, pam_acct_mgmt3 retornará PAM_NEW_AUTHTOK_REQD em vez de PAM_SUCCESS. Se a etapa anterior retornasse PAM_NEW_AUTHTOK_REQD, o servidor agora chamaria pam_chauthtok3 para forçar o cliente a alterar o token de autenticação para a conta solicitada. Agora que o requerente foi devidamente autenticado, o servidor chama pam_setcred3 para estabelecer as credenciais da conta solicitada. É capaz de fazer isso porque age em nome do mediador e possui as credenciais do madiador. Depois que as credenciais corretas forem estabelecidas, o servidor chamará pam_open_session3 para configurar a sessão. O servidor agora executa qualquer serviço solicitado pelo cliente - por exemplo, fornecer ao requerente um shell. Quando o servidor terminar de atender ao cliente, ele chamará pam_close_session3 para derrubar a sessão. Finalmente, o servidor chama pam_end3 para notificar a biblioteca PAM que ela esta pronta e que pode liberar quaisquer recursos alocados no curso da transação.
Configuração do PAM
Arquivos de política do PAM
O arquivo <filename>/etc/pam.conf</filename> O arquivo de política tradicional do PAM é /etc/pam.conf. Este arquivo contém todas as políticas do PAM para o seu sistema. Cada linha do arquivo descreve uma etapa em uma chain, conforme mostrado abaixo: -login auth required pam_nologin.so no_warn + login auth required pam_nologin.so no_warn Os campos estão, na ordem: nome do serviço, nome do recurso, flag de controle, nome do módulo e argumentos do módulo. Quaisquer campos adicionais são interpretados como argumentos adicionais do módulo. Uma chain separada é construída para cada par de serviço/recurso, portanto, embora a ordem na qual as linhas para o mesmo serviço e recurso apareçam seja significativa, a ordem na qual os serviços e recursos individuais são listados não é. Os exemplos no artigo original do PAM agruparam as linhas de configuração por recurso, e o suporte do Solaris ao pam.conf ainda faz isso, mas a configuração de ações do FreeBSD configura as linhas por serviço. De qualquer maneira está bem; De qualquer forma, faz o mesmo sentido.
O diretório <filename>/etc/pam.d</filename> O OpenPAM e o Linux-PAM suportam um mecanismo de configuração alternativo, que é o mecanismo preferido no FreeBSD. Neste esquema, cada política está contida em um arquivo separado com o nome do serviço ao qual se aplica. Esses arquivos são armazenados em /etc/pam.d/. Esses arquivos de políticas por serviço possuem apenas quatro campos, em vez de cinco no pam.conf: o campo nome do serviço é omitido. Assim, em vez da linha de exemplo no pam.conf da seção anterior, a seguinte linha deve estar em /etc/pam.d/login: auth required pam_nologin.so no_warn Como consequência dessa sintaxe simplificada, é possível usar a mesma política para vários serviços vinculando cada nome de serviço a um mesmo arquivo de política. Por exemplo, para usar a mesma política para os serviços su e sudo, pode-se fazer o seguinte: -# cd /etc/pam.d + # cd /etc/pam.d # ln -s su sudo Isso funciona porque o nome do serviço é determinado a partir do nome do arquivo em vez de ser especificado no arquivo de políticas, portanto, o mesmo arquivo pode ser usado para vários serviços com nomes diferentes. Como a política de cada serviço é armazenada em um arquivo separado, o mecanismo pam.d também facilita a instalação de políticas adicionais para pacotes de software de terceiros.
A ordem de pesquisa da política Como vimos acima, as políticas do PAM podem ser encontradas em vários lugares. O que acontece se as políticas para o mesmo serviço existirem em vários lugares? É essencial entender que o sistema de configuração do PAM está centrado em chains.
Quebra de uma linha de configuração Como explicado em , cada linha em /etc/pam.conf consiste em quatro ou mais campos: o nome do serviço, o nome do recurso, a flag de controle, o nome do módulo e nenhum ou mais argumentos do módulo. O nome do serviço é geralmente (embora nem sempre) o nome do aplicativo ao qual a instrução se aplica. Se não tiver certeza, consulte a documentação do aplicativo individual para determinar qual nome de serviço ele usa. Note que se você usar /etc/pam.d/ em vez de /etc/pam.conf, o nome do serviço é especificado pelo nome do arquivo de política e omitido a partir das linhas de configuração atuais, que então começam com o nome da instalação. O recurso é uma das quatro palavras-chave do recurso descritas em . Da mesma forma, a flag de controle é uma das quatro palavras-chave descritas em , descrevendo como interpretar o código de retorno do módulo. O Linux-PAM suporta uma sintaxe alternativa que permite especificar a ação para associar com cada código de retorno possível, mas isso deve ser evitado, pois não é padrão e está intimamente ligado à forma como o Linux-PAM envia chamadas de serviço (que difere muito da maneira que Solaris e OpenPAM fazem isso). Não surpreendentemente, o OpenPAM não suporta esta sintaxe.
Políticas Para configurar o PAM corretamente, é essencial entender como as políticas são interpretadas. Quando um aplicativo chama pam_start3, a biblioteca PAM carrega a diretiva do serviço especificado e constrói quatro chains de módulos (uma para cada recurso). Se uma ou mais dessas chains estiverem vazias, as chains correspondentes da política para o outro serviço são substituídas. Quando o aplicativo chama mais tarde uma das seis primitivas PAM, a biblioteca PAM recupera a chain para o recurso correspondente e chama a função de serviço apropriado em cada módulo listado na chain, na ordem em que foram listadas na configuração. Após cada chamada para uma função de serviço, o tipo de módulo e o código de erro retornado pela função de serviço são usados ​​para determinar o que acontece a seguir. Com algumas exceções, discutidas abaixo, a tabela a seguir se aplica: - Resumo de execução da chain de PAM + Resumo de execução da cadeia PAM + PAM_SUCCESS PAM_IGNORE other - + binding if (!fail) break; - fail = true; + required - - fail = true; + requisite - - fail = true; break; + sufficient if (!fail) break; - - + optional - - -
Se fail for true no final de uma chain, ou quando um break for atingido, o dispatcher retornará o código de erro retornado pelo primeiro módulo que falhou. Caso contrário, retorna PAM_SUCCESS. A primeira exceção é que o código de erro PAM_NEW_AUTHTOK_REQD é tratado como um sucesso, exceto que se nenhum módulo falhar e pelo menos um módulo retornar PAM_NEW_AUTHTOK_REQD, o dispatcher retornará PAM_NEW_AUTHTOK_REQD. A segunda exceção é que pam_setcred3 trata os módulos binding e sufficient como se eles fossem required. A terceira e última exceção é que pam_chauthtok3 executa a chain inteira duas vezes (uma vez para verificações preliminares e uma vez para definir a senha), e na fase preliminar, ele trata os módulos binding e sufficient como se fossem required.
Módulos PAM do FreeBSD
<citerefentry><refentrytitle>pam_deny</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_deny8 é um dos módulos mais simples disponíveis; responde a qualquer pedido com PAM_AUTH_ERR. É útil para desabilitar rapidamente um serviço (adicioná-lo ao topo de cada chain) ou para encerrar chains de módulos sufficient.
<citerefentry><refentrytitle>pam_echo</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_echo8 simplesmente passa seus argumentos para a função de conversação como uma mensagem PAM_TEXT_INFO. É principalmente útil para depuração, mas também pode servir para exibir mensagens como O acesso não autorizado será processado antes de iniciar o procedimento de autenticação.
<citerefentry><refentrytitle>pam_exec</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_exec8 leva seu primeiro argumento a ser o nome de um programa a ser executado, e os argumentos restantes são passados ​​para esse programa como argumentos de linha de comando. Uma aplicação possível é usá-lo para executar um programa no momento do login, que monta o diretório pessoal do usuário.
<citerefentry><refentrytitle>pam_ftpusers</refentrytitle><manvolnum>8</manvolnum></citerefentry> The pam_ftpusers8 module
<citerefentry><refentrytitle>pam_group</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_group8 aceita ou rejeita os requerentes com base em sua participação em um determinado grupo de arquivos (normalmente wheel para su1). Ele é destinado principalmente para manter o comportamento tradicional do su1 do BSD, mas tem muitos outros usos, como excluir determinados grupos de usuários de um serviço particular.
<citerefentry><refentrytitle>pam_guest</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_guest8 permite logins convidados usando nomes de login fixos. Vários requerimentos podem ser colocados na senha, mas o comportamento padrão é permitir qualquer senha, desde que o nome de login seja o de uma conta de convidado. O módulo pam_guest8 pode ser facilmente utilizado para implementar logins FTP anônimos.
<citerefentry><refentrytitle>pam_krb5</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_krb58
<citerefentry><refentrytitle>pam_ksu</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_ksu8
<citerefentry><refentrytitle>pam_lastlog</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_lastlog8
<citerefentry><refentrytitle>pam_login_access</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_login_access8 fornece uma implementação da primitiva de gerenciamento de contas que impõe as restrições de login especificadas na tabela login.access5.
<citerefentry><refentrytitle>pam_nologin</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_nologin8 recusa logins não-root quando existe um /var/run/nologin. Este arquivo é normalmente criado por shutdown8 quando restam menos de cinco minutos até o horário de encerramento programado.
<citerefentry><refentrytitle>pam_opie</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_opie8 implementa o método de autenticação opie4. O sistema opie4 é um mecanismo de desafio-resposta em que a resposta a cada desafio é uma função direta do desafio e uma frase-senha, então a resposta pode ser facilmente computada just in time por qualquer pessoa que possua a senha, eliminando a necessidade de listas de senhas. Além disso, como opie4 nunca reutiliza um desafio que tenha sido respondido corretamente, ele não é vulnerável a ataques de repetição.
<citerefentry><refentrytitle>pam_opieaccess</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_opieaccess8 é um módulo complementar para pam_opie8. Sua finalidade é impor as restrições codificadas em opieaccess5, que regulam as condições sob as quais um usuário que normalmente se autenticaria usando opie4 tem permissão para usar métodos alternativos. Isso geralmente é usado para proibir o uso de autenticação de senha de hosts não confiáveis. Para ser eficaz, o módulo pam_opieaccess8 deve ser listado como requisite imediatamente após uma entrada sufficient para pam_opie8, e antes de qualquer outro módulo, na chain auth.
<citerefentry><refentrytitle>pam_passwdqc</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_passwdqc8
<citerefentry><refentrytitle>pam_permit</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_permit8 é um dos módulos mais simples disponíveis; responde a qualquer pedido com PAM_SUCCESS. É útil como um espaço reservado para serviços onde uma ou mais chains estariam vazias.
<citerefentry><refentrytitle>pam_radius</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_radius8
<citerefentry><refentrytitle>pam_rhosts</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_rhosts8
<citerefentry><refentrytitle>pam_rootok</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_rootok8 reporta sucesso se e somente se o ID do usuário real do processo que o chama (que é assumido como sendo executado pelo requerente) é 0. Isso é útil para serviços que não estão em rede, como su1 ou passwd1, para o qual o root deve ter acesso automático.
<citerefentry><refentrytitle>pam_securetty</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_securetty8
<citerefentry><refentrytitle>pam_self</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_self8 reporta sucesso se, e somente se, os nomes do requerente coincidem com os da conta de destino. É mais útil para serviços que não estão em rede, como su1, onde a identidade do requerente pode ser facilmente verificada.
<citerefentry><refentrytitle>pam_ssh</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_ssh8 fornece serviços de autenticação e de sessão. O serviço de autenticação permite que os usuários que tenham chaves secretas SSH protegidas por senha em seu diretório ~/.ssh se autentiquem digitando sua frase secreta. O serviço de sessão inicia o ssh-agent1 e o pré-carrega com as chaves que foram descriptografadas na fase de autenticação. Esse recurso é particularmente útil para logins locais, seja em X (usando xdm1 ou outro gerenciador de login X que reconhece o PAM ) ou no console.
<citerefentry><refentrytitle>pam_tacplus</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_tacplus8
<citerefentry><refentrytitle>pam_unix</refentrytitle><manvolnum>8</manvolnum></citerefentry> O módulo pam_unix8 implementa a autenticação de senha UNIX tradicional, usando getpwnam3 para obter a senha da conta de destino e compará-la com a fornecida pelo requerente. Ele também fornece serviços de gerenciamento de conta (impondo tempos de expiração de conta e senha) e serviços de alteração de senha. Este é provavelmente o módulo mais útil, já que a grande maioria dos administradores desejará manter um comportamento histórico para pelo menos alguns serviços.
Programação de Aplicação PAM Esta seção ainda não foi escrita.
Programação de Módulos PAM Esta seção ainda não foi escrita.
Exemplo de Aplicação PAM O que vem a seguir é uma implementação mínima de su1 utilizando o PAM. Observe que ele usa a função de conversa openpam_ttyconv3 específica do OpenPAM, que é prototipada em security/openpam.h . Se você deseja construir este aplicativo em um sistema com uma biblioteca PAM diferente, você terá que fornecer sua própria função de conversação. Uma função de conversa robusta é surpreendentemente difícil de implementar; o apresentado em é um bom ponto de partida, mas não deve ser usado em aplicações do mundo real. -/*- + /*- * Copyright (c) 2002,2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and * Network Associates Laboratories, the Security Research Division of * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 * ("CBOSS"), as part of the DARPA CHATS research program. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $P4: //depot/projects/openpam/bin/su/su.c#10 $ * $FreeBSD$ */ #include <sys/param.h> #include <sys/wait.h> #include <err.h> #include <pwd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <syslog.h> #include <unistd.h> #include <security/pam_appl.h> #include <security/openpam.h> /* for openpam_ttyconv() */ extern char **environ; static pam_handle_t *pamh; static struct pam_conv pamc; static void usage(void) { fprintf(stderr, "Usage: su [login [args]]\n"); exit(1); } int main(int argc, char *argv[]) { char hostname[MAXHOSTNAMELEN]; const char *user, *tty; char **args, **pam_envlist, **pam_env; struct passwd *pwd; int o, pam_err, status; pid_t pid; while ((o = getopt(argc, argv, "h")) != -1) switch (o) { case 'h': default: usage(); } argc -= optind; argv += optind; if (argc > 0) { user = *argv; --argc; ++argv; } else { user = "root"; } /* initialize PAM */ pamc.conv = &openpam_ttyconv; pam_start("su", user, &pamc, &pamh); /* set some items */ gethostname(hostname, sizeof(hostname)); if ((pam_err = pam_set_item(pamh, PAM_RHOST, hostname)) != PAM_SUCCESS) goto pamerr; user = getlogin(); if ((pam_err = pam_set_item(pamh, PAM_RUSER, user)) != PAM_SUCCESS) goto pamerr; tty = ttyname(STDERR_FILENO); if ((pam_err = pam_set_item(pamh, PAM_TTY, tty)) != PAM_SUCCESS) goto pamerr; /* authenticate the applicant */ if ((pam_err = pam_authenticate(pamh, 0)) != PAM_SUCCESS) goto pamerr; if ((pam_err = pam_acct_mgmt(pamh, 0)) == PAM_NEW_AUTHTOK_REQD) pam_err = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK); if (pam_err != PAM_SUCCESS) goto pamerr; /* establish the requested credentials */ if ((pam_err = pam_setcred(pamh, PAM_ESTABLISH_CRED)) != PAM_SUCCESS) goto pamerr; /* authentication succeeded; open a session */ if ((pam_err = pam_open_session(pamh, 0)) != PAM_SUCCESS) goto pamerr; /* get mapped user name; PAM may have changed it */ pam_err = pam_get_item(pamh, PAM_USER, (const void **)&user); if (pam_err != PAM_SUCCESS || (pwd = getpwnam(user)) == NULL) goto pamerr; /* export PAM environment */ if ((pam_envlist = pam_getenvlist(pamh)) != NULL) { for (pam_env = pam_envlist; *pam_env != NULL; ++pam_env) { putenv(*pam_env); free(*pam_env); } free(pam_envlist); } /* build argument list */ if ((args = calloc(argc + 2, sizeof *args)) == NULL) { warn("calloc()"); goto err; } *args = pwd->pw_shell; memcpy(args + 1, argv, argc * sizeof *args); /* fork and exec */ switch ((pid = fork())) { case -1: warn("fork()"); goto err; case 0: /* child: give up privs and start a shell */ /* set uid and groups */ if (initgroups(pwd->pw_name, pwd->pw_gid) == -1) { warn("initgroups()"); _exit(1); } if (setgid(pwd->pw_gid) == -1) { warn("setgid()"); _exit(1); } if (setuid(pwd->pw_uid) == -1) { warn("setuid()"); _exit(1); } execve(*args, args, environ); warn("execve()"); _exit(1); default: /* parent: wait for child to exit */ waitpid(pid, &status, 0); /* close the session and release PAM resources */ pam_err = pam_close_session(pamh, 0); pam_end(pamh, pam_err); exit(WEXITSTATUS(status)); } pamerr: fprintf(stderr, "Sorry\n"); err: pam_end(pamh, pam_err); exit(1); } Exemplo do módulo PAM Segue-se uma implementação mínima de pam_unix8, oferecendo apenas serviços de autenticação. Ele deve ser compilado e executado com a maioria das implementações do PAM, mas aproveita as extensões do OpenPAM, se disponível: observe o uso de pam_get_authtok3, que simplifica enormemente solicitando ao usuário uma senha. /*- * Copyright (c) 2002 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and * Network Associates Laboratories, the Security Research Division of * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 * ("CBOSS"), as part of the DARPA CHATS research program. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $P4: //depot/projects/openpam/modules/pam_unix/pam_unix.c#3 $ * $FreeBSD$ */ #include <sys/param.h> #include <pwd.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <security/pam_modules.h> #include <security/pam_appl.h> #ifndef _OPENPAM static char password_prompt[] = "Password:"; #endif #ifndef PAM_EXTERN #define PAM_EXTERN #endif PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char *argv[]) { #ifndef _OPENPAM struct pam_conv *conv; struct pam_message msg; const struct pam_message *msgp; struct pam_response *resp; #endif struct passwd *pwd; const char *user; char *crypt_password, *password; int pam_err, retry; /* identify user */ if ((pam_err = pam_get_user(pamh, &user, NULL)) != PAM_SUCCESS) return (pam_err); if ((pwd = getpwnam(user)) == NULL) return (PAM_USER_UNKNOWN); /* get password */ #ifndef _OPENPAM pam_err = pam_get_item(pamh, PAM_CONV, (const void **)&conv); if (pam_err != PAM_SUCCESS) return (PAM_SYSTEM_ERR); msg.msg_style = PAM_PROMPT_ECHO_OFF; msg.msg = password_prompt; msgp = &msg; #endif for (retry = 0; retry < 3; ++retry) { #ifdef _OPENPAM pam_err = pam_get_authtok(pamh, PAM_AUTHTOK, (const char **)&password, NULL); #else resp = NULL; pam_err = (*conv->conv)(1, &msgp, &resp, conv->appdata_ptr); if (resp != NULL) { if (pam_err == PAM_SUCCESS) password = resp->resp; else free(resp->resp); free(resp); } #endif if (pam_err == PAM_SUCCESS) break; } if (pam_err == PAM_CONV_ERR) return (pam_err); if (pam_err != PAM_SUCCESS) return (PAM_AUTH_ERR); /* compare passwords */ if ((!pwd->pw_passwd[0] && (flags & PAM_DISALLOW_NULL_AUTHTOK)) || (crypt_password = crypt(password, pwd->pw_passwd)) == NULL || strcmp(crypt_password, pwd->pw_passwd) != 0) pam_err = PAM_AUTH_ERR; else pam_err = PAM_SUCCESS; #ifndef _OPENPAM free(password); #endif return (pam_err); } PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh, int flags, int argc, const char *argv[]) { return (PAM_SUCCESS); } PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char *argv[]) { return (PAM_SUCCESS); } PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char *argv[]) { return (PAM_SUCCESS); } PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags, int argc, const char *argv[]) { return (PAM_SUCCESS); } PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, const char *argv[]) { return (PAM_SERVICE_ERR); } #ifdef PAM_MODULE_ENTRY PAM_MODULE_ENTRY("pam_unix"); #endif Exemplo de função de conversação PAM A função de conversação apresentada abaixo é uma versão bastante simplificada do openpam_ttyconv do OpenPAM. Ele é totalmente funcional e deve dar ao leitor uma boa ideia de como uma função de conversa deve se comportar, mas é simples demais para uso no mundo real. Mesmo se você não estiver usando o OpenPAM, sinta-se à vontade para baixar o código-fonte e adaptar openpam_ttyconv3 aos seus usos; acreditamos que seja tão robusto quanto uma função de conversa orientada para tty pode razoavelmente ser. /*- * Copyright (c) 2002 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and * Network Associates Laboratories, the Security Research Division of * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 * ("CBOSS"), as part of the DARPA CHATS research program. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <security/pam_appl.h> int converse(int n, const struct pam_message **msg, struct pam_response **resp, void *data) { struct pam_response *aresp; char buf[PAM_MAX_RESP_SIZE]; int i; data = data; if (n <= 0 || n > PAM_MAX_NUM_MSG) return (PAM_CONV_ERR); if ((aresp = calloc(n, sizeof *aresp)) == NULL) return (PAM_BUF_ERR); for (i = 0; i < n; ++i) { aresp[i].resp_retcode = 0; aresp[i].resp = NULL; switch (msg[i]->msg_style) { case PAM_PROMPT_ECHO_OFF: aresp[i].resp = strdup(getpass(msg[i]->msg)); if (aresp[i].resp == NULL) goto fail; break; case PAM_PROMPT_ECHO_ON: fputs(msg[i]->msg, stderr); if (fgets(buf, sizeof buf, stdin) == NULL) goto fail; aresp[i].resp = strdup(buf); if (aresp[i].resp == NULL) goto fail; break; case PAM_ERROR_MSG: fputs(msg[i]->msg, stderr); if (strlen(msg[i]->msg) > 0 && msg[i]->msg[strlen(msg[i]->msg) - 1] != '\n') fputc('\n', stderr); break; case PAM_TEXT_INFO: fputs(msg[i]->msg, stdout); if (strlen(msg[i]->msg) > 0 && msg[i]->msg[strlen(msg[i]->msg) - 1] != '\n') fputc('\n', stdout); break; default: goto fail; } } *resp = aresp; return (PAM_SUCCESS); fail: for (i = 0; i < n; ++i) { if (aresp[i].resp != NULL) { memset(aresp[i].resp, 0, strlen(aresp[i].resp)); free(aresp[i].resp); } } memset(aresp, 0, n * sizeof *aresp); *resp = NULL; return (PAM_CONV_ERR); } - Leitura Adicional - + + Leitura Adicional - - Esta é uma lista de documentos relevantes para o PAM e questões relacionadas. Não está de modo algum completo. - + + Esta é uma lista de documentos relevantes para o PAM e questões relacionadas. Não está de modo algum completo. + Papers Tornando os serviços de login independentes das tecnologias de autenticação - SamarVipin - LaiCharlie + Samar Vipin + Lai Charlie Sun Microsystems Especificação Preliminar do X/Open Single Sign-on O grupo aberto 1-85912-144-6 Junho de 1997 Módulos de autenticação plugáveis​​ - MorganAndrewG. + Morgan Andrew G. 06-10-1999 Manuais do usuário Administração do PAM Sun Microsystems - Páginas Web relacionadas + Páginas Web Relacionadas Homepage do OpenPAM - SmørgravDag-Erling + Smørgrav Dag-Erling ThinkSec AS Página inicial do Linux-PAM - MorganAndrewG. + Morgan Andrew G. Página inicial do Solaris PAM Sun Microsystems
Index: head/pt_BR.ISO8859-1/articles/pam/pt_BR.po =================================================================== --- head/pt_BR.ISO8859-1/articles/pam/pt_BR.po (revision 52676) +++ head/pt_BR.ISO8859-1/articles/pam/pt_BR.po (revision 52677) @@ -1,3501 +1,3503 @@ # $FreeBSD$ # Danilo G. Baio , 2018. #zanata # Edson Brandi , 2018. #zanata # Silvio Ap Silva , 2018. #zanata -# Nilton José Rizzo , 2018. #zanata msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2018-09-14 02:10+0000\n" -"PO-Revision-Date: 2018-09-14 01:45+0000\n" -"Last-Translator: Edson Brandi \n" +"POT-Creation-Date: 2018-12-12 13:05+0000\n" +"PO-Revision-Date: 2018-12-12 01:02+0000\n" +"Last-Translator: Copied by Zanata \n" "Language-Team: \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Zanata 4.6.2\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" #. Put one translator per line, in the form NAME , YEAR1, YEAR2 msgctxt "_" msgid "translator-credits" msgstr "" -"Nilton José Rizzo, rizzo@rizzo.eng.br, 2018\n" +"Nilton José Rizzo aka rizzo@rizzo.eng.br\n" "Edson Brandi, ebrandi@FreeBSD.org, 2018\n" -"Danilo G. Baio, dbaio@FreeBSD.org, 2018\n" "Silvio Ap Silva, contato@kanazuchi.com, 2018" #. (itstool) path: info/title -#: article.translate.xml:37 +#: article.translate.xml:38 msgid "Pluggable Authentication Modules" msgstr "Módulos de Autenticação Plugáveis" #. (itstool) path: abstract/para #: article.translate.xml:41 msgid "" "This article describes the underlying principles and mechanisms of the " "Pluggable Authentication Modules (PAM) library, and explains how to " "configure PAM, how to integrate PAM into applications, and how to write PAM " "modules." msgstr "" "Esse artigo descreve princípios subjacentes e mecanismos da biblioteca de " "Módulos de Autenticação Plugáveis (PAM), e explica como configurar, como " "integrar com outras aplicações e como escrever novos módulos." #. (itstool) path: info/copyright #: article.translate.xml:47 msgid "" "2001 2002 2003 Networks " "Associates Technology, Inc." msgstr "" "2001 2002 2003 Networks " "Associates Technology, Inc." #. (itstool) path: authorgroup/author #: article.translate.xml:55 msgid "" -"Dag-ErlingSmørgravContributed by " +" Dag-Erling Smørgrav Contributed by " msgstr "" -"Dag-ErlingSmørgravContributed by " +" Dag-Erling Smørgrav Contributed by " #. (itstool) path: legalnotice/para -#: article.translate.xml:59 +#: article.translate.xml:65 msgid "" "This article was written for the FreeBSD Project by ThinkSec AS and Network " "Associates Laboratories, the Security Research Division of Network " "Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 (CBOSS), as part of the DARPA CHATS research program." msgstr "" "This article was written for the FreeBSD Project by ThinkSec AS and Network " "Associates Laboratories, the Security Research Division of Network " "Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 (CBOSS), as part of the DARPA CHATS research program." #. (itstool) path: legalnotice/para -#: article.translate.xml:67 +#: article.translate.xml:73 msgid "FreeBSD is a registered trademark of the FreeBSD Foundation." msgstr "FreeBSD is a registered trademark of the FreeBSD Foundation." #. (itstool) path: legalnotice/para -#: article.translate.xml:69 +#: article.translate.xml:75 msgid "Linux is a registered trademark of Linus Torvalds." msgstr "Linux is a registered trademark of Linus Torvalds." #. (itstool) path: legalnotice/para -#: article.translate.xml:71 +#: article.translate.xml:77 msgid "" "Motif, OSF/1, and UNIX are registered trademarks and IT DialTone and The " "Open Group are trademarks of The Open Group in the United States and other " "countries." msgstr "" "Motif, OSF/1, and UNIX are registered trademarks and IT DialTone and The " "Open Group are trademarks of The Open Group in the United States and other " "countries." #. (itstool) path: legalnotice/para -#: article.translate.xml:75 +#: article.translate.xml:81 msgid "" "Sun, Sun Microsystems, Java, Java Virtual Machine, JDK, JRE, JSP, JVM, " "Netra, OpenJDK, Solaris, StarOffice, SunOS and VirtualBox are trademarks or " "registered trademarks of Sun Microsystems, Inc. in the United States and " "other countries." msgstr "" "Sun, Sun Microsystems, Java, Java Virtual Machine, JDK, JRE, JSP, JVM, " "Netra, OpenJDK, Solaris, StarOffice, SunOS and VirtualBox are trademarks or " "registered trademarks of Sun Microsystems, Inc. in the United States and " "other countries." #. (itstool) path: legalnotice/para -#: article.translate.xml:80 +#: article.translate.xml:86 msgid "" "Many of the designations used by manufacturers and sellers to distinguish " "their products are claimed as trademarks. Where those designations appear in " "this document, and the FreeBSD Project was aware of the trademark claim, the " "designations have been followed by the or the ® symbol." msgstr "" "Many of the designations used by manufacturers and sellers to distinguish " "their products are claimed as trademarks. Where those designations appear in " "this document, and the FreeBSD Project was aware of the trademark claim, the " "designations have been followed by the or the ® symbol." #. (itstool) path: info/releaseinfo -#: article.translate.xml:88 +#: article.translate.xml:94 msgid "" -"$FreeBSD: head/en_US.ISO8859-1/articles/pam/article.xml 48488 2016-03-28 " -"17:29:21Z jgh $" +"$FreeBSD: head/en_US.ISO8859-1/articles/pam/article.xml 52137 2018-08-16 " +"14:45:06Z bcr $" msgstr "$FreeBSD$" #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-intro.title -#: article.translate.xml:92 +#: article.translate.xml:98 msgid "Introduction" msgstr "Introdução" #. (itstool) path: section/para -#: article.translate.xml:94 +#: article.translate.xml:100 msgid "" "The Pluggable Authentication Modules (PAM) library is a generalized API for " "authentication-related services which allows a system administrator to add " "new authentication methods simply by installing new PAM modules, and to " "modify authentication policies by editing configuration files." msgstr "" "A biblioteca dos Módulos de Autenticação Plugáveis (PAM) é uma API " "generalizada para serviços relacionados com autenticações as quais permitem " "ao administrador de sistema adicionar um novo método de autenticação " "simplesmente pela instalação de um novo módulo PAM, e modificar a política " "de autenticação pela edição do arquivo de configuração." #. (itstool) path: section/para -#: article.translate.xml:100 +#: article.translate.xml:106 msgid "" "PAM was defined and developed in 1995 by Vipin Samar and Charlie Lai of Sun " "Microsystems, and has not changed much since. In 1997, the Open Group " "published the X/Open Single Sign-on (XSSO) preliminary specification, which " "standardized the PAM API and added extensions for single (or rather " "integrated) sign-on. At the time of this writing, this specification has not " "yet been adopted as a standard." msgstr "" "O PAM foi definido e desenvolvido em 1995 por Vipin Samar e Charlie Lai da " "Sun Microsystems, e não teve muitas mudanças até hoje. Em 1997, o Open Group " "publicou a especificação preliminar do X/Open Single Sign-on (XSSO), a qual " "padroniza a API do PAM e adiciona extensões para autenticação única ou " "integrada. No momento da redação deste documento, esta especificação ainda " "não tinha sido adotada como padrão." #. (itstool) path: section/para -#: article.translate.xml:108 +#: article.translate.xml:114 msgid "" "Although this article focuses primarily on FreeBSD 5.x, which uses OpenPAM, " "it should be equally applicable to FreeBSD 4.x, which uses Linux-PAM, and " "other operating systems such as Linux and Solaris." msgstr "" "Apesar deste artigo focar primariamente no sistema FreeBSD 5.x, o qual usa o " "OpenPAM, ele poderá ser igualmente aplicado ao FreeBSD 4.x, o qual usa o " "Linux-PAM, e a outros systemas operacionais, tais como o Linux e o " "Solaris." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-terms.title -#: article.translate.xml:115 -msgid "Terms and conventions" +#: article.translate.xml:121 +msgid "Terms and Conventions" msgstr "Termos e convenções" #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-definitions.title -#: article.translate.xml:118 +#: article.translate.xml:124 msgid "Definitions" msgstr "Definições" #. (itstool) path: section/para -#: article.translate.xml:120 +#: article.translate.xml:126 msgid "" "The terminology surrounding PAM is rather confused. Neither Samar and Lai's " "original paper nor the XSSO specification made any attempt at formally " "defining terms for the various actors and entities involved in PAM, and the " "terms that they do use (but do not define) are sometimes misleading and " "ambiguous. The first attempt at establishing a consistent and unambiguous " "terminology was a whitepaper written by Andrew G. Morgan (author of Linux-" "PAM) in 1999. While Morgan's choice of terminology was a huge leap forward, " "it is in this author's opinion by no means perfect. What follows is an " "attempt, heavily inspired by Morgan, to define precise and unambiguous terms " "for all actors and entities involved in PAM." msgstr "" "A terminologia em torno do PAM é bastante confusa. Nem o artigo original de " "Neither Samar e Lai nem a especificação original do XSSO fizeram algum " "esforço para definir formalmente os termos de vários atores e entidades " "envolvidas no PAM, e os termos que eles usam (mas não definem) são algumas " "vezes duvidosos ou ambíguos. A primeira tentativa de estabelecer uma " "terminologia consistente e não ambígua foi feita no artigo escrito por " "Andrew G. Morgan (autor do Linux-PAM) em 1999. A escolha da terminologia de " "Morgan foi um grande avanço, mas na opinião deste autor, não é perfeita. O " "que segue é uma tentativa, fortemente inspirada por Morgan, de definir " "termos precisos e não ambíguos para todos os atores e entidades envolvidas " "no PAM." #. (itstool) path: glossentry/glossterm -#: article.translate.xml:136 +#: article.translate.xml:142 msgid "account" msgstr "conta (account)" #. (itstool) path: glossdef/para -#: article.translate.xml:138 +#: article.translate.xml:144 msgid "The set of credentials the applicant is requesting from the arbitrator." msgstr "" "Um conjunto de credenciais que o requerente está solicitando ao mediador." #. (itstool) path: glossentry/glossterm -#: article.translate.xml:144 +#: article.translate.xml:150 msgid "applicant" msgstr "requerente (applicant)" #. (itstool) path: glossdef/para -#: article.translate.xml:146 +#: article.translate.xml:152 msgid "The user or entity requesting authentication." msgstr "Usuário ou entidade que solicita autenticação" #. (itstool) path: glossentry/glossterm -#: article.translate.xml:151 +#: article.translate.xml:157 msgid "arbitrator" msgstr "Mediador (arbitrator)" #. (itstool) path: glossdef/para -#: article.translate.xml:153 +#: article.translate.xml:159 msgid "" "The user or entity who has the privileges necessary to verify the " "applicant's credentials and the authority to grant or deny the request." msgstr "" "Usuário ou entidade a qual tem privilégios necessários para verificar as " "credenciais do requerente e autorizar ou não a solicitação" #. (itstool) path: glossentry/glossterm -#: article.translate.xml:160 +#: article.translate.xml:166 msgid "chain" msgstr "chain" #. (itstool) path: glossdef/para -#: article.translate.xml:162 +#: article.translate.xml:168 msgid "" "A sequence of modules that will be invoked in response to a PAM request. The " "chain includes information about the order in which to invoke the modules, " "what arguments to pass to them, and how to interpret the results." msgstr "" "Uma sequência de módulos que irá ser chamada em resposta a uma solicitação " "do PAM. A chain inclui informações sobre a ordem a qual invocar os módulos, " "quais argumentos foram passados e como interpretar os resultados." #. (itstool) path: glossentry/glossterm -#: article.translate.xml:171 +#: article.translate.xml:177 msgid "client" msgstr "client" #. (itstool) path: glossdef/para -#: article.translate.xml:173 +#: article.translate.xml:179 msgid "" "The application responsible for initiating an authentication request on " "behalf of the applicant and for obtaining the necessary authentication " "information from him." msgstr "" "A aplicação responsável por inicializar uma solicitação de autenticação em " "nome do requerente para obter as informações necessárias da autenticação " "dele." #. (itstool) path: glossentry/glossterm -#: article.translate.xml:181 +#: article.translate.xml:187 msgid "facility" msgstr "recursos " #. (itstool) path: glossdef/para -#: article.translate.xml:183 +#: article.translate.xml:189 msgid "" "One of the four basic groups of functionality provided by PAM: " "authentication, account management, session management and authentication " "token update." msgstr "" "Um dos quatro grupos básicos de funcionalidades fornecidos pelo PAM: " "autenticação, gerenciamento de conta, gerenciamento de sessão e atualização " "de token de autenticação." #. (itstool) path: glossentry/glossterm -#: article.translate.xml:191 +#: article.translate.xml:197 msgid "module" msgstr "módulo" #. (itstool) path: glossdef/para -#: article.translate.xml:193 +#: article.translate.xml:199 msgid "" "A collection of one or more related functions implementing a particular " "authentication facility, gathered into a single (normally dynamically " "loadable) binary file and identified by a single name." msgstr "" "Uma coleção de uma ou mais funções relacionadas implementando um recurso de " "autenticação específico, reunidas em um único arquivo binário (normalmente " "carregável dinamicamente) e identificadas por um único nome." #. (itstool) path: glossentry/glossterm -#: article.translate.xml:201 +#: article.translate.xml:207 msgid "policy" msgstr "política" #. (itstool) path: glossdef/para -#: article.translate.xml:203 +#: article.translate.xml:209 msgid "" "The complete set of configuration statements describing how to handle PAM " "requests for a particular service. A policy normally consists of four " "chains, one for each facility, though some services do not use all four " "facilities." msgstr "" "O conjunto completo de instruções de configuração que descrevem como lidar " "com solicitações do PAM para um serviço específico. Uma política normalmente " "consiste em quatro chains, uma para cada recurso, embora alguns serviços não " "utilizem os quatro recursos." #. (itstool) path: glossentry/glossterm -#: article.translate.xml:212 +#: article.translate.xml:218 msgid "server" msgstr "servidor" #. (itstool) path: glossdef/para -#: article.translate.xml:214 +#: article.translate.xml:220 msgid "" "The application acting on behalf of the arbitrator to converse with the " "client, retrieve authentication information, verify the applicant's " "credentials and grant or deny requests." msgstr "" "O aplicativo agindo em nome do mediador para conversar com o cliente, " "recuperar informações de autenticação, verificar as credenciais do " "requerente e conceder ou negar solicitações." #. (itstool) path: glossentry/glossterm -#: article.translate.xml:222 +#: article.translate.xml:228 msgid "service" msgstr "serviço" #. (itstool) path: glossdef/para -#: article.translate.xml:224 +#: article.translate.xml:230 msgid "" "A class of servers providing similar or related functionality and requiring " "similar authentication. PAM policies are defined on a per-service basis, so " "all servers that claim the same service name will be subject to the same " "policy." msgstr "" "Classe de servidores que provêm recursos similares ou relacionados e " "requerem autenticação similar. As políticas do PAM são definidas por " "serviço, portanto, todos os servidores que reivindicam o mesmo nome de " "serviço estarão sujeitos à mesma política." #. (itstool) path: glossentry/glossterm -#: article.translate.xml:233 +#: article.translate.xml:239 msgid "session" msgstr "sessão" #. (itstool) path: glossdef/para -#: article.translate.xml:235 +#: article.translate.xml:241 msgid "" "The context within which service is rendered to the applicant by the server. " "One of PAM's four facilities, session management, is concerned exclusively " "with setting up and tearing down this context." msgstr "" "O contexto com o qual serviços são apresentados para o requerente pelo " "servidor. Um dos quatro recursos do PAM, gerenciamento de sessão, é " "concedido exclusivamente configurando e derrubando esse contexto." #. (itstool) path: glossentry/glossterm -#: article.translate.xml:243 +#: article.translate.xml:249 msgid "token" msgstr "token" #. (itstool) path: glossdef/para -#: article.translate.xml:245 +#: article.translate.xml:251 msgid "" "A chunk of information associated with the account, such as a password or " "passphrase, which the applicant must provide to prove his identity." msgstr "" "Um pedaço de informação associada à conta, como uma senha sendo uma palavra " "ou uma frase, que o solicitante deve fornecer para provar sua identidade." #. (itstool) path: glossentry/glossterm -#: article.translate.xml:252 +#: article.translate.xml:258 msgid "transaction" msgstr "transação" #. (itstool) path: glossdef/para -#: article.translate.xml:254 +#: article.translate.xml:260 msgid "" "A sequence of requests from the same applicant to the same instance of the " "same server, beginning with authentication and session set-up and ending " "with session tear-down." msgstr "" "Uma sequência de solicitações do mesmo requerente para a mesma instância do " "mesmo servidor, começando com a configuração de autenticação e sessão e " "terminando com a desmontagem da sessão." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-usage-examples.title -#: article.translate.xml:264 -msgid "Usage examples" +#: article.translate.xml:270 +msgid "Usage Examples" msgstr "Exemplos de uso" #. (itstool) path: section/para -#: article.translate.xml:266 +#: article.translate.xml:272 msgid "" "This section aims to illustrate the meanings of some of the terms defined " "above by way of a handful of simple examples." msgstr "" "Esta seção tem como objetivo ilustrar os significados de alguns dos termos " "definidos acima por meio de alguns exemplos simples." #. (itstool) path: section/title -#: article.translate.xml:271 -msgid "Client and server are one" +#: article.translate.xml:277 +msgid "Client and Server Are One" msgstr "O cliente e o servidor são um" #. (itstool) path: section/para -#: article.translate.xml:273 +#: article.translate.xml:279 msgid "" "This simple example shows alice " "su1'ing to root." msgstr "" "Este exemplo simples mostra alice usando " "su1 " "para se tornar root." #. (itstool) path: section/screen -#: article.translate.xml:276 +#: article.translate.xml:282 #, no-wrap msgid "" "% whoami\n" "alice\n" "% ls -l `which su`\n" "-r-sr-xr-x 1 root wheel 10744 Dec 6 19:06 /usr/bin/su\n" "% su -\n" "Password: xi3kiune\n" "# whoami\n" -"root\n" +"root" msgstr "" "% whoami\n" "alice\n" "% ls -l `which su`\n" "-r-sr-xr-x 1 root wheel 10744 Dec 6 19:06 /usr/bin/su\n" "% su -\n" "Password: xi3kiune\n" "# whoami\n" -"root\n" +"root" #. (itstool) path: listitem/para -#: article.translate.xml:288 +#: article.translate.xml:293 msgid "The applicant is alice." msgstr "O requerente é alice." #. (itstool) path: listitem/para -#: article.translate.xml:291 +#: article.translate.xml:296 msgid "The account is root." msgstr "A conta é root." #. (itstool) path: listitem/para -#: article.translate.xml:294 +#: article.translate.xml:299 msgid "" "The su1 process is both client and server." msgstr "" "O processo su1 é ao mesmo tempo, o cliente e o servidor." #. (itstool) path: listitem/para -#: article.translate.xml:298 +#: article.translate.xml:303 msgid "The authentication token is xi3kiune." msgstr "O token de autenticação é xi3kiune." #. (itstool) path: listitem/para -#: article.translate.xml:302 +#: article.translate.xml:307 msgid "" "The arbitrator is root, which is why " "su1 is setuid root." msgstr "" "O mediador é root, e é por isso que " "su1 possui setuid para root." #. (itstool) path: section/title -#: article.translate.xml:309 -msgid "Client and server are separate" +#: article.translate.xml:314 +msgid "Client and Server Are Separate" msgstr "O cliente e o servidor são separados" #. (itstool) path: section/para -#: article.translate.xml:311 +#: article.translate.xml:316 msgid "" "The example below shows eve try to initiate an " "ssh1 connection to login.example.com, ask to log " "in as bob, and succeed. Bob should have chosen a better " "password!" msgstr "" "O exemplo abaixo mostra eve tentar iniciar uma conexão " "ssh1 com login.example.com, solicitar para " "efetuar login como bob e ter exito. Bob deveria ter " "escolhido uma senha melhor!" #. (itstool) path: section/screen -#: article.translate.xml:317 +#: article.translate.xml:322 #, no-wrap msgid "" "% whoami\n" "eve\n" "% ssh bob@login.example.com\n" "bob@login.example.com's password: god\n" "Last login: Thu Oct 11 09:52:57 2001 from 192.168.0.1\n" "Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994\n" "\tThe Regents of the University of California. All rights reserved.\n" "FreeBSD 4.4-STABLE (LOGIN) #4: Tue Nov 27 18:10:34 PST 2001\n" "\n" "Welcome to FreeBSD!\n" "%" msgstr "" "% whoami\n" "eve\n" "% ssh bob@login.example.com\n" "bob@login.example.com's password: god\n" "Last login: Thu Oct 11 09:52:57 2001 from 192.168.0.1\n" "Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994\n" "\tThe Regents of the University of California. All rights reserved.\n" "FreeBSD 4.4-STABLE (LOGIN) #4: Tue Nov 27 18:10:34 PST 2001\n" "\n" "Welcome to FreeBSD!\n" "%" #. (itstool) path: listitem/para -#: article.translate.xml:331 +#: article.translate.xml:336 msgid "The applicant is eve." msgstr "O requerente é eve." #. (itstool) path: listitem/para -#: article.translate.xml:334 +#: article.translate.xml:339 msgid "" "The client is Eve's ssh1 process." msgstr "" "O cliente é o processo ssh1 de Eve." #. (itstool) path: listitem/para -#: article.translate.xml:337 +#: article.translate.xml:342 msgid "" "The server is the sshd8 process on " "login.example.com" msgstr "" "O servidor é o processo sshd8 em login." "example.com" #. (itstool) path: listitem/para -#: article.translate.xml:341 +#: article.translate.xml:346 msgid "The account is bob." msgstr "A conta é bob." #. (itstool) path: listitem/para -#: article.translate.xml:344 +#: article.translate.xml:349 msgid "The authentication token is god." msgstr "O token de autenticação é god." #. (itstool) path: listitem/para -#: article.translate.xml:348 +#: article.translate.xml:353 msgid "" "Although this is not shown in this example, the arbitrator is root." msgstr "" "Embora isso não seja mostrado neste exemplo, o mediador é root." #. (itstool) path: section/title -#: article.translate.xml:355 -msgid "Sample policy" +#: article.translate.xml:360 +msgid "Sample Policy" msgstr "Exemplo de política" #. (itstool) path: section/para -#: article.translate.xml:357 +#: article.translate.xml:362 msgid "The following is FreeBSD's default policy for sshd:" msgstr "A seguir, a política padrão do FreeBSD para sshd:" #. (itstool) path: section/programlisting -#: article.translate.xml:360 +#: article.translate.xml:365 #, no-wrap msgid "" "sshd\tauth\t\trequired\tpam_nologin.so\tno_warn\n" "sshd\tauth\t\trequired\tpam_unix.so\tno_warn try_first_pass\n" "sshd\taccount\t\trequired\tpam_login_access.so\n" "sshd\taccount\t\trequired\tpam_unix.so\n" "sshd\tsession\t\trequired\tpam_lastlog.so\tno_fail\n" "sshd\tpassword\trequired\tpam_permit.so" msgstr "" "sshd\tauth\t\trequired\tpam_nologin.so\tno_warn\n" "sshd\tauth\t\trequired\tpam_unix.so\tno_warn try_first_pass\n" "sshd\taccount\t\trequired\tpam_login_access.so\n" "sshd\taccount\t\trequired\tpam_unix.so\n" "sshd\tsession\t\trequired\tpam_lastlog.so\tno_fail\n" "sshd\tpassword\trequired\tpam_permit.so" #. (itstool) path: listitem/para -#: article.translate.xml:369 +#: article.translate.xml:374 msgid "" "This policy applies to the sshd service (which is not " "necessarily restricted to the sshd8 server.)" msgstr "" "Esta política se aplica ao serviço sshd (que não é " "necessariamente restrito ao servidor sshd8)." #. (itstool) path: listitem/para -#: article.translate.xml:374 +#: article.translate.xml:379 msgid "" "auth, account, session and password are facilities." msgstr "" "auth, account, session e password são recursos." #. (itstool) path: listitem/para -#: article.translate.xml:379 +#: article.translate.xml:384 msgid "" "pam_nologin.so, pam_unix.so, " "pam_login_access.so, pam_lastlog.so and pam_permit.so are modules. It is clear " "from this example that pam_unix.so provides at least " "two facilities (authentication and account management.)" msgstr "" "pam_nologin.so, pam_unix.so, " "pam_login_access.so, pam_lastlog.so e pam_permit.so são módulos. Fica claro neste " "exemplo que o pam_unix.so fornece pelo menos dois " "recursos (autenticação e gerenciamento de conta)." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-essentials.title -#: article.translate.xml:403 +#: article.translate.xml:408 msgid "PAM Essentials" msgstr "PAM Essencial" #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-facilities-primitives.title -#: article.translate.xml:406 -msgid "Facilities and primitives" -msgstr "Recursos e primitivos" +#: article.translate.xml:411 +msgid "Facilities and Primitives" +msgstr "Recursos e Primitivas" #. (itstool) path: section/para -#: article.translate.xml:409 +#: article.translate.xml:414 msgid "" "The PAM API offers six different authentication primitives grouped in four " "facilities, which are described below." msgstr "" "A API do PAM oferece seis primitivas de autenticação diferentes agrupadas em " "quatro recursos, descritos abaixo." #. (itstool) path: varlistentry/term -#: article.translate.xml:414 +#: article.translate.xml:419 msgid "auth" msgstr "auth" #. (itstool) path: listitem/para -#: article.translate.xml:416 +#: article.translate.xml:421 msgid "" "Authentication. This facility concerns itself with " "authenticating the applicant and establishing the account credentials. It " "provides two primitives:" msgstr "" "Autenticação. Este recurso se preocupa em autenticar o " "requerente e estabelecer as credenciais da conta. Ele fornece duas " "primitivas:" #. (itstool) path: listitem/para -#: article.translate.xml:423 +#: article.translate.xml:428 msgid "" "pam_authenticate3 authenticates the applicant, usually by requesting " "an authentication token and comparing it with a value stored in a database " "or obtained from an authentication server." msgstr "" "pam_authenticate3 autentica o requerente, geralmente solicitando um " "token de autenticação e comparando-o com um valor armazenado em um banco de " "dados ou obtido de um servidor de autenticação." #. (itstool) path: listitem/para -#: article.translate.xml:431 +#: article.translate.xml:436 msgid "" "pam_setcred3 establishes account credentials such as user ID, " "group membership and resource limits." msgstr "" "pam_setcred3 estabelece credenciais de conta, como ID de " "usuário, associação de grupo e limites de recursos." #. (itstool) path: varlistentry/term -#: article.translate.xml:440 +#: article.translate.xml:445 msgid "account" msgstr "account" #. (itstool) path: listitem/para -#: article.translate.xml:442 +#: article.translate.xml:447 msgid "" "Account management. This facility handles non-" "authentication-related issues of account availability, such as access " "restrictions based on the time of day or the server's work load. It provides " "a single primitive:" msgstr "" "Gerenciamento de contas. Esse recurso lida com " "problemas de disponibilidade de conta não relacionados à autenticação, como " "restrições de acesso com base na hora do dia ou na carga de trabalho do " "servidor. Ele fornece uma única primitiva:" #. (itstool) path: listitem/para -#: article.translate.xml:450 +#: article.translate.xml:455 msgid "" "pam_acct_mgmt3 verifies that the requested account is available." msgstr "" "pam_acct_mgmt3 verifica se a conta solicitada está disponível." #. (itstool) path: varlistentry/term -#: article.translate.xml:458 +#: article.translate.xml:463 msgid "session" msgstr "session" #. (itstool) path: listitem/para -#: article.translate.xml:460 +#: article.translate.xml:465 msgid "" "Session management. This facility handles tasks " "associated with session set-up and tear-down, such as login accounting. It " "provides two primitives:" msgstr "" "Gerenciamento de sessão. Esse recurso lida com tarefas " "associadas à configuração e desmontagem da sessão, como a contabilização de " "login. Ele fornece duas primitivas:" #. (itstool) path: listitem/para -#: article.translate.xml:467 +#: article.translate.xml:472 msgid "" "pam_open_session3 performs tasks associated with session set-up: add " "an entry in the utmp and wtmp " "databases, start an SSH agent, etc." msgstr "" "pam_open_session3 executa tarefas associadas à configuração da " "sessão: adiciona uma entrada nos bancos de dados utmp e " "wtmp, inicia um agente SSH, etc." #. (itstool) path: listitem/para -#: article.translate.xml:475 +#: article.translate.xml:480 msgid "" "pam_close_session3 performs tasks associated with session tear-down: " "add an entry in the utmp and wtmp " "databases, stop the SSH agent, etc." msgstr "" "pam_close_session3 executa tarefas associadas à desmontagem da " "sessão: adiciona uma entrada nos bancos de dados utmp e " "wtmp, pare o agente SSH, etc." #. (itstool) path: varlistentry/term -#: article.translate.xml:486 +#: article.translate.xml:491 msgid "password" msgstr "password" #. (itstool) path: listitem/para -#: article.translate.xml:488 +#: article.translate.xml:493 msgid "" "Password management. This facility is used to change " "the authentication token associated with an account, either because it has " "expired or because the user wishes to change it. It provides a single " "primitive:" msgstr "" "Gerenciamento de senhas. Esse recurso é usado para " "alterar o token de autenticação associado a uma conta, porque expirou ou " "porque o usuário deseja alterá-lo. Ele fornece uma única primitiva:" #. (itstool) path: listitem/para -#: article.translate.xml:496 +#: article.translate.xml:501 msgid "" "pam_chauthtok3 changes the authentication token, optionally " "verifying that it is sufficiently hard to guess, has not been used " "previously, etc." msgstr "" "pam_chauthtok3 altera o token de autenticação, opcionalmente, " "verificando se é suficientemente difícil de adivinhar, se não foi usado " "anteriormente etc." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules.title -#: article.translate.xml:509 +#: article.translate.xml:514 msgid "Modules" msgstr "Módulos" #. (itstool) path: section/para -#: article.translate.xml:511 +#: article.translate.xml:516 msgid "" "Modules are a very central concept in PAM; after all, they are the M in PAM. A PAM module is a self-contained piece of " "program code that implements the primitives in one or more facilities for " "one particular mechanism; possible mechanisms for the authentication " "facility, for instance, include the UNIX password database, NIS, LDAP and Radius." msgstr "" "Módulos são um conceito muito central no PAM; afinal, eles são os M no PAM. Um módulo PAM é um código de programa " "autocontido que implementa as primitivas em uma ou mais instalações para um " "mecanismo específico; possíveis mecanismos para o recurso de autenticação, " "por exemplo, incluem os bancos de dados de senhas UNIX, NIS, LDAP e Radius." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-module-naming.title -#: article.translate.xml:520 +#: article.translate.xml:525 msgid "Module Naming" msgstr "Nomeação de Módulos" #. (itstool) path: section/para -#: article.translate.xml:522 +#: article.translate.xml:527 msgid "" "FreeBSD implements each mechanism in a single module, named " "pam_mechanism.so (for " "instance, pam_unix.so for the UNIX mechanism.) Other implementations sometimes " "have separate modules for separate facilities, and include the facility name " "as well as the mechanism name in the module name. To name one example, " "Solaris has a pam_dial_auth.so.1 " "module which is commonly used to authenticate dialup users." msgstr "" "O FreeBSD implementa cada mecanismo em um único módulo, chamado " "pam_mechanism.so (por exemplo, " "pam_unix.so para o mecanismo UNIX. Outras implementações às vezes possuem módulos " "separados para instalações separadas e incluem o nome do recurso, bem como o " "nome do mecanismo no nome do módulo. Para citar um exemplo, " "Solaris tem um módulo pam_dial_auth.so.1 que é comumente usado para autenticar usuários de conexões discadas." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-module-versioning.title -#: article.translate.xml:535 +#: article.translate.xml:540 msgid "Module Versioning" msgstr "Versionando Módulos" #. (itstool) path: section/para -#: article.translate.xml:537 +#: article.translate.xml:543 msgid "" "FreeBSD's original PAM implementation, based on Linux-PAM, did not use " "version numbers for PAM modules. This would commonly cause problems with " "legacy applications, which might be linked against older versions of the " "system libraries, as there was no way to load a matching version of the " "required modules." msgstr "" "A implementação original do PAM no FreeBSD, baseada no Linux-PAM, não " "utilizou números de versão para os módulos PAM. Isso normalmente causaria " "problemas com aplicativos legados, que poderiam estar vinculados a versões " "mais antigas das bibliotecas do sistema, pois não havia como carregar uma " "versão correspondente dos módulos necessários." #. (itstool) path: section/para -#: article.translate.xml:544 +#: article.translate.xml:550 msgid "" "OpenPAM, on the other hand, looks for modules that have the same version " "number as the PAM library (currently 2), and only falls back to an " "unversioned module if no versioned module could be loaded. Thus legacy " "modules can be provided for legacy applications, while allowing new (or " "newly built) applications to take advantage of the most recent modules." msgstr "" "O OpenPAM, por outro lado, procura por módulos que possuam o mesmo número de " "versão que a biblioteca PAM (atualmente 2), e só retorna a um módulo não " "versionado se nenhum módulo versionado puder ser carregado. Assim, os " "módulos legados podem ser fornecidos para aplicativos legados, permitindo " "que novos aplicativos (ou recém-construídos) aproveitem os módulos mais " "recentes." #. (itstool) path: section/para -#: article.translate.xml:552 +#: article.translate.xml:558 msgid "" "Although Solaris PAM modules commonly have a version " "number, they are not truly versioned, because the number is a part of the " "module name and must be included in the configuration." msgstr "" "Embora os módulos PAM do Solaris normalmente tenham " "um número de versão, eles não são realmente versionados, porque o número é " "uma parte do nome do módulo e deve ser incluído na configuração." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-chains-policies.title -#: article.translate.xml:560 -msgid "Chains and policies" -msgstr "Chains e Políticas" +#: article.translate.xml:566 +msgid "Chains and Policies" +msgstr "Cadeias e Políticas" #. (itstool) path: section/para -#: article.translate.xml:563 +#: article.translate.xml:569 msgid "" "When a server initiates a PAM transaction, the PAM library tries to load a " "policy for the service specified in the " "pam_start3 call. The policy specifies how authentication " "requests should be processed, and is defined in a configuration file. This " "is the other central concept in PAM: the possibility for the admin to tune " "the system security policy (in the wider sense of the word) simply by " "editing a text file." msgstr "" "Quando um servidor inicia uma transação PAM, a biblioteca PAM tenta carregar " "uma política para o serviço especificado na chamada " "pam_start3. A política especifica como as solicitações de " "autenticação devem ser processadas e definidas em um arquivo de " "configuração. Este é o outro conceito central no PAM: a possibilidade de o " "administrador ajustar a política de segurança do sistema (no sentido mais " "amplo da palavra) simplesmente editando um arquivo de texto." #. (itstool) path: section/para -#: article.translate.xml:572 +#: article.translate.xml:578 msgid "" "A policy consists of four chains, one for each of the four PAM facilities. " "Each chain is a sequence of configuration statements, each specifying a " "module to invoke, some (optional) parameters to pass to the module, and a " "control flag that describes how to interpret the return code from the module." msgstr "" "Uma política consiste em quatro cadeias, uma para cada uma dos quatro " "recursos do PAM. Cada chain é uma sequência de instruções de configuração, " "cada uma especificando um módulo para invocar, alguns parâmetros (opcionais) " "para passar para o módulo e um sinalizador de controle que descreve como " "interpretar o código de retorno do módulo." #. (itstool) path: section/para -#: article.translate.xml:579 +#: article.translate.xml:585 msgid "" "Understanding the control flags is essential to understanding PAM " "configuration files. There are four different control flags:" msgstr "" "Entender os sinalizadores de controle é essencial para entender os arquivos " "de configuração do PAM. Existem quatro diferentes flags de controle:" #. (itstool) path: varlistentry/term -#: article.translate.xml:585 +#: article.translate.xml:591 msgid "binding" msgstr "binding" #. (itstool) path: listitem/para -#: article.translate.xml:587 +#: article.translate.xml:593 msgid "" "If the module succeeds and no earlier module in the chain has failed, the " "chain is immediately terminated and the request is granted. If the module " "fails, the rest of the chain is executed, but the request is ultimately " "denied." msgstr "" "Se o módulo tiver exito e nenhum módulo anterior na chain tiver falhado, a " "chain será encerrada imediatamente e a solicitação será concedida. Se o " "módulo falhar, o resto da chain é executado, mas a solicitação é negada no " "final." #. (itstool) path: listitem/para -#: article.translate.xml:593 +#: article.translate.xml:599 msgid "" "This control flag was introduced by Sun in Solaris 9 " "(SunOS 5.9), and is also supported by OpenPAM." msgstr "" "Esta flag de controle foi introduzida pela Sun no Solaris9 (SunOS 5.9), e também é suportado pelo " "OpenPAM." #. (itstool) path: varlistentry/term -#: article.translate.xml:599 +#: article.translate.xml:606 msgid "required" msgstr "required" #. (itstool) path: listitem/para -#: article.translate.xml:601 +#: article.translate.xml:608 msgid "" "If the module succeeds, the rest of the chain is executed, and the request " "is granted unless some other module fails. If the module fails, the rest of " "the chain is also executed, but the request is ultimately denied." msgstr "" "Se o módulo tiver exito, o restante da chain será executada e a solicitação " "será concedida, a menos que algum outro módulo falhe. Se o módulo falhar, o " "restante da chain também será executado, mas a solicitação será negada no " "final." #. (itstool) path: varlistentry/term -#: article.translate.xml:610 +#: article.translate.xml:617 msgid "requisite" msgstr "requisite" #. (itstool) path: listitem/para -#: article.translate.xml:612 +#: article.translate.xml:619 msgid "" "If the module succeeds, the rest of the chain is executed, and the request " "is granted unless some other module fails. If the module fails, the chain is " "immediately terminated and the request is denied." msgstr "" "Se o módulo for tiver exito, o restante da chain será executado e a " "solicitação será concedida, a menos que algum outro módulo falhe. Se o " "módulo falhar, a chain será encerrada imediatamente e a solicitação será " "negada." #. (itstool) path: varlistentry/term -#: article.translate.xml:620 +#: article.translate.xml:627 msgid "sufficient" msgstr "sufficient" #. (itstool) path: listitem/para -#: article.translate.xml:622 +#: article.translate.xml:629 msgid "" "If the module succeeds and no earlier module in the chain has failed, the " "chain is immediately terminated and the request is granted. If the module " "fails, the module is ignored and the rest of the chain is executed." msgstr "" "Se o módulo tiver exito e nenhum módulo anterior na chain tiver falhado, a " "chain será encerrada imediatamente e a solicitação será concedida. Se o " "módulo falhar, o módulo será ignorado e o resto da chain será executado." #. (itstool) path: listitem/para -#: article.translate.xml:628 +#: article.translate.xml:635 msgid "" "As the semantics of this flag may be somewhat confusing, especially when it " "is used for the last module in a chain, it is recommended that the " "binding control flag be used instead if the " "implementation supports it." msgstr "" "Como a semântica dessa flag pode ser um pouco confusa, especialmente quando " "ela é usada para o último módulo em uma chain, é recomendado que a flag de " "controle binding seja usada em seu lugar, se a " "implementação o suportar." #. (itstool) path: varlistentry/term -#: article.translate.xml:637 +#: article.translate.xml:644 msgid "optional" msgstr "optional" #. (itstool) path: listitem/para -#: article.translate.xml:639 +#: article.translate.xml:646 msgid "" "The module is executed, but its result is ignored. If all modules in a chain " "are marked optional, all requests will always be granted." msgstr "" "O módulo é executado, mas seu resultado é ignorado. Se todos os módulos em " "uma chain estiverem marcados como optional, todas as " "solicitações serão sempre concedidas." #. (itstool) path: section/para -#: article.translate.xml:647 +#: article.translate.xml:654 msgid "" "When a server invokes one of the six PAM primitives, PAM retrieves the chain " "for the facility the primitive belongs to, and invokes each of the modules " "listed in the chain, in the order they are listed, until it reaches the end, " "or determines that no further processing is necessary (either because a " "binding or sufficient module " "succeeded, or because a requisite module failed.) The " "request is granted if and only if at least one module was invoked, and all " "non-optional modules succeeded." msgstr "" "Quando um servidor invoca uma das seis primitivas PAM, o PAM recupera a " "chain para o recurso ao qual a primitiva pertence, e invoca cada um dos " "módulos listados na chain, na ordem em que estão listados, até chegar ao fim " "ou determina que nenhum processamento adicional é necessário (porque um " "módulo binding ou sufficient teve " "exito, ou porque um módulo requisite falhou.) O pedido é " "concedido se e somente se pelo menos um módulo foi chamado e todos os " "módulos não opcionais tiveram exito." #. (itstool) path: section/para -#: article.translate.xml:658 +#: article.translate.xml:665 msgid "" "Note that it is possible, though not very common, to have the same module " "listed several times in the same chain. For instance, a module that looks up " "user names and passwords in a directory server could be invoked multiple " "times with different parameters specifying different directory servers to " "contact. PAM treat different occurrences of the same module in the same " "chain as different, unrelated modules." msgstr "" "Note que é possível, embora não muito comum, ter o mesmo módulo listado " "várias vezes na mesma chain. Por exemplo, um módulo que procura nomes de " "usuário e senhas em um servidor de diretório pode ser chamado várias vezes " "com parâmetros diferentes, especificando diferentes servidores de diretórios " "para contato. O PAM trata diferentes ocorrências do mesmo módulo na mesma " "chain de módulos diferentes e não relacionados." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-transactions.title -#: article.translate.xml:668 +#: article.translate.xml:675 msgid "Transactions" msgstr "Transações" #. (itstool) path: section/para -#: article.translate.xml:670 +#: article.translate.xml:677 msgid "" "The lifecycle of a typical PAM transaction is described below. Note that if " "any of these steps fails, the server should report a suitable error message " "to the client and abort the transaction." msgstr "" "O ciclo de vida de uma transação típica do PAM é descrito abaixo. Observe " "que, se qualquer uma dessas etapas falhar, o servidor deverá informar uma " "mensagem de erro adequada ao cliente e anular a transação." #. (itstool) path: listitem/para -#: article.translate.xml:677 +#: article.translate.xml:684 msgid "" "If necessary, the server obtains arbitrator credentials through a mechanism " "independent of PAM—most commonly by virtue of having been started by " "root, or of being setuid root." msgstr "" "Se necessário, o servidor obtém as credenciais do mediador por meio de um " "mecanismo independente do PAM - mais comumente em virtude de ter sido " "iniciado por root ou de ser setuid root." #. (itstool) path: listitem/para -#: article.translate.xml:685 +#: article.translate.xml:692 msgid "" "The server calls pam_start3 to initialize the PAM " "library and specify its service name and the target account, and register a " "suitable conversation function." msgstr "" "O servidor chama pam_start3 para inicializar a " "biblioteca PAM, especificar seu nome de serviço e a conta de destino e " "registrar uma função de conversação adequada." #. (itstool) path: listitem/para -#: article.translate.xml:692 +#: article.translate.xml:699 msgid "" "The server obtains various information relating to the transaction (such as " "the applicant's user name and the name of the host the client runs on) and " "submits it to PAM using pam_set_item3." msgstr "" "O servidor obtém várias informações relacionadas à transação (como o nome de " "usuário do requerente e o nome do host no qual o cliente é executado) e o " "envia ao PAM usando pam_set_item3." #. (itstool) path: listitem/para -#: article.translate.xml:699 +#: article.translate.xml:706 msgid "" "The server calls pam_authenticate3 to authenticate the " "applicant." msgstr "" "O servidor chama pam_authenticate3 para autenticar o " "requerente." #. (itstool) path: listitem/para -#: article.translate.xml:704 +#: article.translate.xml:711 msgid "" "The server calls pam_acct_mgmt3 to verify that the " "requested account is available and valid. If the password is correct but has " "expired, pam_acct_mgmt3 will return " "PAM_NEW_AUTHTOK_REQD instead of PAM_SUCCESS." msgstr "" "O servidor chama pam_acct_mgmt3 para verificar se a " "conta solicitada está disponível e é válida. Se a senha estiver correta mas " "expirar, pam_acct_mgmt3 retornará " "PAM_NEW_AUTHTOK_REQD em vez de PAM_SUCCESS." #. (itstool) path: listitem/para -#: article.translate.xml:712 +#: article.translate.xml:719 msgid "" "If the previous step returned PAM_NEW_AUTHTOK_REQD, the " "server now calls pam_chauthtok3 to force the client to " "change the authentication token for the requested account." msgstr "" "Se a etapa anterior retornasse PAM_NEW_AUTHTOK_REQD, o " "servidor agora chamaria pam_chauthtok3 para forçar o cliente " "a alterar o token de autenticação para a conta solicitada." #. (itstool) path: listitem/para -#: article.translate.xml:719 +#: article.translate.xml:726 msgid "" "Now that the applicant has been properly authenticated, the server calls " "pam_setcred3 to establish the credentials of the requested " "account. It is able to do this because it acts on behalf of the arbitrator, " "and holds the arbitrator's credentials." msgstr "" "Agora que o requerente foi devidamente autenticado, o servidor chama " "pam_setcred3 para estabelecer as credenciais da conta " "solicitada. É capaz de fazer isso porque age em nome do mediador e possui as " "credenciais do madiador." #. (itstool) path: listitem/para -#: article.translate.xml:727 +#: article.translate.xml:734 msgid "" "Once the correct credentials have been established, the server calls " "pam_open_session3 to set up the session." msgstr "" "Depois que as credenciais corretas forem estabelecidas, o servidor chamará " "pam_open_session3 para configurar a sessão." #. (itstool) path: listitem/para -#: article.translate.xml:733 +#: article.translate.xml:740 msgid "" "The server now performs whatever service the client requested—for instance, " "provide the applicant with a shell." msgstr "" "O servidor agora executa qualquer serviço solicitado pelo cliente - por " "exemplo, fornecer ao requerente um shell." #. (itstool) path: listitem/para -#: article.translate.xml:739 +#: article.translate.xml:746 msgid "" "Once the server is done serving the client, it calls " "pam_close_session3 to tear down the session." msgstr "" "Quando o servidor terminar de atender ao cliente, ele chamará " "pam_close_session3 para derrubar a sessão." #. (itstool) path: listitem/para -#: article.translate.xml:744 +#: article.translate.xml:751 msgid "" "Finally, the server calls pam_end3 to notify the PAM " "library that it is done and that it can release whatever resources it has " "allocated in the course of the transaction." msgstr "" "Finalmente, o servidor chama pam_end3 para notificar a " "biblioteca PAM que ela esta pronta e que pode liberar quaisquer recursos " "alocados no curso da transação." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-config.title -#: article.translate.xml:754 +#: article.translate.xml:761 msgid "PAM Configuration" msgstr "Configuração do PAM" #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-config-file.title -#: article.translate.xml:757 -msgid "PAM policy files" +#: article.translate.xml:764 +msgid "PAM Policy Files" msgstr "Arquivos de política do PAM" #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-config-pam.conf.title -#: article.translate.xml:760 -msgid "The /etc/pam.conf file" +#: article.translate.xml:767 +msgid "The /etc/pam.conf" msgstr "O arquivo /etc/pam.conf" #. (itstool) path: section/para -#: article.translate.xml:763 +#: article.translate.xml:770 msgid "" "The traditional PAM policy file is /etc/pam.conf. This " "file contains all the PAM policies for your system. Each line of the file " "describes one step in a chain, as shown below:" msgstr "" "O arquivo de política tradicional do PAM é /etc/pam.conf. Este arquivo contém todas as políticas do PAM para o seu sistema. " "Cada linha do arquivo descreve uma etapa em uma chain, conforme mostrado " "abaixo:" #. (itstool) path: section/programlisting -#: article.translate.xml:768 +#: article.translate.xml:775 #, no-wrap msgid "login auth required pam_nologin.so no_warn" msgstr "login auth required pam_nologin.so no_warn" #. (itstool) path: section/para -#: article.translate.xml:770 +#: article.translate.xml:777 msgid "" "The fields are, in order: service name, facility name, control flag, module " "name, and module arguments. Any additional fields are interpreted as " "additional module arguments." msgstr "" "Os campos estão, na ordem: nome do serviço, nome do recurso, flag de " "controle, nome do módulo e argumentos do módulo. Quaisquer campos adicionais " "são interpretados como argumentos adicionais do módulo." #. (itstool) path: section/para -#: article.translate.xml:775 +#: article.translate.xml:782 msgid "" "A separate chain is constructed for each service / facility pair, so while " "the order in which lines for the same service and facility appear is " "significant, the order in which the individual services and facilities are " "listed is not. The examples in the original PAM paper grouped configuration " "lines by facility, and the Solaris stock " "pam.conf still does that, but FreeBSD's stock " "configuration groups configuration lines by service. Either way is fine; " "either way makes equal sense." msgstr "" "Uma chain separada é construída para cada par de serviço/recurso, portanto, " "embora a ordem na qual as linhas para o mesmo serviço e recurso apareçam " "seja significativa, a ordem na qual os serviços e recursos individuais são " "listados não é. Os exemplos no artigo original do PAM agruparam as linhas de " "configuração por recurso, e o suporte do Solaris ao " "pam.conf ainda faz isso, mas a configuração de ações do " "FreeBSD configura as linhas por serviço. De qualquer maneira está bem; De " "qualquer forma, faz o mesmo sentido." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-config-pam.d.title -#: article.translate.xml:787 -msgid "The /etc/pam.d directory" +#: article.translate.xml:794 +msgid "The /etc/pam.d" msgstr "O diretório /etc/pam.d" #. (itstool) path: section/para -#: article.translate.xml:790 +#: article.translate.xml:797 msgid "" "OpenPAM and Linux-PAM support an alternate configuration mechanism, which is " "the preferred mechanism in FreeBSD. In this scheme, each policy is contained " "in a separate file bearing the name of the service it applies to. These " "files are stored in /etc/pam.d/." msgstr "" "O OpenPAM e o Linux-PAM suportam um mecanismo de configuração alternativo, " "que é o mecanismo preferido no FreeBSD. Neste esquema, cada política está " "contida em um arquivo separado com o nome do serviço ao qual se aplica. " "Esses arquivos são armazenados em /etc/pam.d/." #. (itstool) path: section/para -#: article.translate.xml:796 +#: article.translate.xml:803 msgid "" "These per-service policy files have only four fields instead of " "pam.conf's five: the service name field is omitted. " "Thus, instead of the sample pam.conf line from the " "previous section, one would have the following line in /etc/pam.d/" "login:" msgstr "" "Esses arquivos de políticas por serviço possuem apenas quatro campos, em vez " "de cinco no pam.conf: o campo nome do serviço é " "omitido. Assim, em vez da linha de exemplo no pam.conf " "da seção anterior, a seguinte linha deve estar em /etc/pam.d/" "login:" #. (itstool) path: section/programlisting -#: article.translate.xml:803 +#: article.translate.xml:810 #, no-wrap msgid "auth required pam_nologin.so no_warn" msgstr "auth required pam_nologin.so no_warn" #. (itstool) path: section/para -#: article.translate.xml:805 +#: article.translate.xml:812 msgid "" "As a consequence of this simplified syntax, it is possible to use the same " "policy for multiple services by linking each service name to a same policy " "file. For instance, to use the same policy for the su and " "sudo services, one could do as follows:" msgstr "" "Como consequência dessa sintaxe simplificada, é possível usar a mesma " "política para vários serviços vinculando cada nome de serviço a um mesmo " "arquivo de política. Por exemplo, para usar a mesma política para os " "serviços su e sudo, pode-se fazer o " "seguinte:" #. (itstool) path: section/screen -#: article.translate.xml:812 +#: article.translate.xml:819 #, no-wrap msgid "" "# cd /etc/pam.d\n" "# ln -s su sudo" msgstr "" "# cd /etc/pam.d\n" "# ln -s su sudo" #. (itstool) path: section/para -#: article.translate.xml:815 +#: article.translate.xml:822 msgid "" "This works because the service name is determined from the file name rather " "than specified in the policy file, so the same file can be used for multiple " "differently-named services." msgstr "" "Isso funciona porque o nome do serviço é determinado a partir do nome do " "arquivo em vez de ser especificado no arquivo de políticas, portanto, o " "mesmo arquivo pode ser usado para vários serviços com nomes diferentes." #. (itstool) path: section/para -#: article.translate.xml:820 +#: article.translate.xml:827 msgid "" "Since each service's policy is stored in a separate file, the pam." "d mechanism also makes it very easy to install additional " "policies for third-party software packages." msgstr "" "Como a política de cada serviço é armazenada em um arquivo separado, o " "mecanismo pam.d também facilita a instalação de " "políticas adicionais para pacotes de software de terceiros." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-config-file-order.title -#: article.translate.xml:827 -msgid "The policy search order" +#: article.translate.xml:834 +msgid "The Policy Search Order" msgstr "A ordem de pesquisa da política" #. (itstool) path: section/para -#: article.translate.xml:830 +#: article.translate.xml:837 msgid "" "As we have seen above, PAM policies can be found in a number of places. What " "happens if policies for the same service exist in multiple places?" msgstr "" "Como vimos acima, as políticas do PAM podem ser encontradas em vários " "lugares. O que acontece se as políticas para o mesmo serviço existirem em " "vários lugares?" #. (itstool) path: section/para -#: article.translate.xml:834 +#: article.translate.xml:841 msgid "" "It is essential to understand that PAM's configuration system is centered on " "chains." msgstr "" "É essencial entender que o sistema de configuração do PAM está centrado em " "chains." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-config-breakdown.title -#: article.translate.xml:841 -msgid "Breakdown of a configuration line" +#: article.translate.xml:848 +msgid "Breakdown of a Configuration Line" msgstr "Quebra de uma linha de configuração" #. (itstool) path: section/para -#: article.translate.xml:844 +#: article.translate.xml:851 msgid "" "As explained in , each line in /" "etc/pam.conf consists of four or more fields: the service name, " "the facility name, the control flag, the module name, and zero or more " "module arguments." msgstr "" "Como explicado em , cada linha em " "/etc/pam.conf consiste em quatro ou mais campos: o nome " "do serviço, o nome do recurso, a flag de controle, o nome do módulo e nenhum " "ou mais argumentos do módulo." #. (itstool) path: section/para -#: article.translate.xml:849 +#: article.translate.xml:857 msgid "" "The service name is generally (though not always) the name of the " "application the statement applies to. If you are unsure, refer to the " "individual application's documentation to determine what service name it " "uses." msgstr "" "O nome do serviço é geralmente (embora nem sempre) o nome do aplicativo ao " "qual a instrução se aplica. Se não tiver certeza, consulte a documentação do " "aplicativo individual para determinar qual nome de serviço ele usa." #. (itstool) path: section/para -#: article.translate.xml:854 +#: article.translate.xml:862 msgid "" "Note that if you use /etc/pam.d/ instead of /" "etc/pam.conf, the service name is specified by the name of the " "policy file, and omitted from the actual configuration lines, which then " "start with the facility name." msgstr "" "Note que se você usar /etc/pam.d/ em vez de /" "etc/pam.conf, o nome do serviço é especificado pelo nome do " "arquivo de política e omitido a partir das linhas de configuração atuais, " "que então começam com o nome da instalação." #. (itstool) path: section/para -#: article.translate.xml:860 +#: article.translate.xml:868 msgid "" "The facility is one of the four facility keywords described in ." msgstr "" "O recurso é uma das quatro palavras-chave do recurso descritas em ." #. (itstool) path: section/para -#: article.translate.xml:863 +#: article.translate.xml:871 msgid "" "Likewise, the control flag is one of the four keywords described in , describing how to interpret the return " "code from the module. Linux-PAM supports an alternate syntax that lets you " "specify the action to associate with each possible return code, but this " "should be avoided as it is non-standard and closely tied in with the way " "Linux-PAM dispatches service calls (which differs greatly from the way " "Solaris and OpenPAM do it.) Unsurprisingly, OpenPAM " "does not support this syntax." msgstr "" "Da mesma forma, a flag de controle é uma das quatro palavras-chave descritas " "em , descrevendo como interpretar o " "código de retorno do módulo. O Linux-PAM suporta uma sintaxe alternativa que " "permite especificar a ação para associar com cada código de retorno " "possível, mas isso deve ser evitado, pois não é padrão e está intimamente " "ligado à forma como o Linux-PAM envia chamadas de serviço (que difere muito " "da maneira que Solaris e OpenPAM fazem isso). Não " "surpreendentemente, o OpenPAM não suporta esta sintaxe." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-policies.title -#: article.translate.xml:875 +#: article.translate.xml:883 msgid "Policies" msgstr "Políticas" #. (itstool) path: section/para -#: article.translate.xml:877 +#: article.translate.xml:885 msgid "" "To configure PAM correctly, it is essential to understand how policies are " "interpreted." msgstr "" "Para configurar o PAM corretamente, é essencial entender como as políticas " "são interpretadas." #. (itstool) path: section/para -#: article.translate.xml:880 +#: article.translate.xml:888 msgid "" "When an application calls pam_start3, the PAM library loads " "the policy for the specified service and constructs four module chains (one " "for each facility.) If one or more of these chains are empty, the " "corresponding chains from the policy for the other " "service are substituted." msgstr "" "Quando um aplicativo chama pam_start3, a biblioteca PAM " "carrega a diretiva do serviço especificado e constrói quatro chains de " "módulos (uma para cada recurso). Se uma ou mais dessas chains estiverem " "vazias, as chains correspondentes da política para o outro serviço são substituídas." #. (itstool) path: section/para -#: article.translate.xml:887 +#: article.translate.xml:895 msgid "" "When the application later calls one of the six PAM primitives, the PAM " "library retrieves the chain for the corresponding facility and calls the " "appropriate service function in each module listed in the chain, in the " "order in which they were listed in the configuration. After each call to a " "service function, the module type and the error code returned by the service " "function are used to determine what happens next. With a few exceptions, " "which we discuss below, the following table applies:" msgstr "" "Quando o aplicativo chama mais tarde uma das seis primitivas PAM, a " "biblioteca PAM recupera a chain para o recurso correspondente e chama a " "função de serviço apropriado em cada módulo listado na chain, na ordem em " "que foram listadas na configuração. Após cada chamada para uma função de " "serviço, o tipo de módulo e o código de erro retornado pela função de " "serviço são usados ​​para determinar o que acontece a seguir. Com algumas " "exceções, discutidas abaixo, a tabela a seguir se aplica:" #. (itstool) path: table/title -#: article.translate.xml:898 -msgid "PAM chain execution summary" -msgstr "Resumo de execução da chain de PAM" +#: article.translate.xml:906 +msgid "PAM Chain Execution Summary" +msgstr "Resumo de execução da cadeia PAM" #. (itstool) path: row/entry -#: article.translate.xml:907 +#: article.translate.xml:916 msgid "PAM_SUCCESS" msgstr "PAM_SUCCESS" #. (itstool) path: row/entry -#: article.translate.xml:908 +#: article.translate.xml:917 msgid "PAM_IGNORE" msgstr "PAM_IGNORE" #. (itstool) path: row/entry -#: article.translate.xml:909 +#: article.translate.xml:918 msgid "other" msgstr "other" #. (itstool) path: row/entry -#: article.translate.xml:914 +#: article.translate.xml:923 msgid "binding" msgstr "binding" #. (itstool) path: row/entry -#: article.translate.xml:915 article.translate.xml:933 +#: article.translate.xml:924 article.translate.xml:945 msgid "if (!fail) break;" msgstr "if (!fail) break;" #. (itstool) path: row/entry -#: article.translate.xml:916 article.translate.xml:921 -#: article.translate.xml:922 article.translate.xml:927 -#: article.translate.xml:928 article.translate.xml:934 -#: article.translate.xml:935 article.translate.xml:939 -#: article.translate.xml:940 article.translate.xml:941 +#: article.translate.xml:925 article.translate.xml:931 +#: article.translate.xml:932 article.translate.xml:938 +#: article.translate.xml:939 article.translate.xml:946 +#: article.translate.xml:947 article.translate.xml:952 +#: article.translate.xml:953 article.translate.xml:954 msgid "-" msgstr "-" #. (itstool) path: row/entry -#: article.translate.xml:917 article.translate.xml:923 +#: article.translate.xml:926 article.translate.xml:933 msgid "fail = true;" msgstr "fail = true;" #. (itstool) path: row/entry -#: article.translate.xml:920 +#: article.translate.xml:930 msgid "required" msgstr "required" #. (itstool) path: row/entry -#: article.translate.xml:926 +#: article.translate.xml:937 msgid "requisite" msgstr "requisite" #. (itstool) path: row/entry -#: article.translate.xml:929 +#: article.translate.xml:940 msgid "fail = true; break;" msgstr "fail = true; break;" #. (itstool) path: row/entry -#: article.translate.xml:932 +#: article.translate.xml:944 msgid "sufficient" msgstr "sufficient" #. (itstool) path: row/entry -#: article.translate.xml:938 +#: article.translate.xml:951 msgid "optional" msgstr "optional" #. (itstool) path: section/para -#: article.translate.xml:947 +#: article.translate.xml:960 msgid "" "If fail is true at the end of a chain, or when a " "break is reached, the dispatcher returns the error code " "returned by the first module that failed. Otherwise, it returns " "PAM_SUCCESS." msgstr "" "Se fail for true no final de uma chain, ou quando um " "break for atingido, o dispatcher retornará o código de erro " "retornado pelo primeiro módulo que falhou. Caso contrário, retorna " "PAM_SUCCESS." #. (itstool) path: section/para -#: article.translate.xml:953 +#: article.translate.xml:966 msgid "" "The first exception of note is that the error code " "PAM_NEW_AUTHTOK_REQD is treated like a success, except " "that if no module failed, and at least one module returned " "PAM_NEW_AUTHTOK_REQD, the dispatcher will return " "PAM_NEW_AUTHTOK_REQD." msgstr "" "A primeira exceção é que o código de erro PAM_NEW_AUTHTOK_REQD é tratado como um sucesso, exceto que se nenhum módulo falhar e " "pelo menos um módulo retornar PAM_NEW_AUTHTOK_REQD, o " "dispatcher retornará PAM_NEW_AUTHTOK_REQD." #. (itstool) path: section/para -#: article.translate.xml:960 +#: article.translate.xml:973 msgid "" "The second exception is that pam_setcred3 treats " "binding and sufficient modules as if " "they were required." msgstr "" "A segunda exceção é que pam_setcred3 trata os módulos " "binding e sufficient como se eles " "fossem required." #. (itstool) path: section/para -#: article.translate.xml:965 +#: article.translate.xml:977 msgid "" "The third and final exception is that " "pam_chauthtok3 runs the entire chain twice (once for preliminary " "checks and once to actually set the password), and in the preliminary phase " "it treats binding and sufficient " "modules as if they were required." msgstr "" "A terceira e última exceção é que " "pam_chauthtok3 executa a chain inteira duas vezes (uma vez para " "verificações preliminares e uma vez para definir a senha), e na fase " "preliminar, ele trata os módulos binding e " "sufficient como se fossem required." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-freebsd-modules.title -#: article.translate.xml:976 +#: article.translate.xml:987 msgid "FreeBSD PAM Modules" msgstr "Módulos PAM do FreeBSD" #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-deny.title -#: article.translate.xml:979 +#: article.translate.xml:991 msgid "" "pam_deny8" msgstr "" "pam_deny8" #. (itstool) path: section/para -#: article.translate.xml:981 +#: article.translate.xml:993 msgid "" "The pam_deny8 module is one of the simplest modules available; " "it responds to any request with PAM_AUTH_ERR. It is " "useful for quickly disabling a service (add it to the top of every chain), " "or for terminating chains of sufficient modules." msgstr "" "O módulo pam_deny8 é um dos módulos mais simples disponíveis; " "responde a qualquer pedido com PAM_AUTH_ERR. É útil para " "desabilitar rapidamente um serviço (adicioná-lo ao topo de cada chain) ou " "para encerrar chains de módulos sufficient." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-echo.title -#: article.translate.xml:990 +#: article.translate.xml:1002 msgid "" "pam_echo8" msgstr "" "pam_echo8" #. (itstool) path: section/para -#: article.translate.xml:992 +#: article.translate.xml:1004 msgid "" "The pam_echo8 module simply passes its arguments to the " "conversation function as a PAM_TEXT_INFO message. It is " "mostly useful for debugging, but can also serve to display messages such as " "Unauthorized access will be prosecuted before starting the " "authentication procedure." msgstr "" "O módulo pam_echo8 simplesmente passa seus argumentos para a função " "de conversação como uma mensagem PAM_TEXT_INFO. É " "principalmente útil para depuração, mas também pode servir para exibir " "mensagens como O acesso não autorizado será processado antes " "de iniciar o procedimento de autenticação." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-exec.title -#: article.translate.xml:1001 +#: article.translate.xml:1013 msgid "" "pam_exec8" msgstr "" "pam_exec8" #. (itstool) path: section/para -#: article.translate.xml:1003 +#: article.translate.xml:1015 msgid "" "The pam_exec8 module takes its first argument to be the name of " "a program to execute, and the remaining arguments are passed to that program " "as command-line arguments. One possible application is to use it to run a " "program at login time which mounts the user's home directory." msgstr "" "O módulo pam_exec8 leva seu primeiro argumento a ser o nome de um " "programa a ser executado, e os argumentos restantes são passados ​​para esse " "programa como argumentos de linha de comando. Uma aplicação possível é usá-" "lo para executar um programa no momento do login, que monta o diretório " "pessoal do usuário." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-ftpusers.title -#: article.translate.xml:1011 +#: article.translate.xml:1023 msgid "" "pam_ftpusers8" msgstr "" "pam_ftpusers8" #. (itstool) path: section/para -#: article.translate.xml:1013 +#: article.translate.xml:1025 msgid "" "The pam_ftpusers8 module" msgstr "" "The pam_ftpusers8 module" #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-group.title -#: article.translate.xml:1017 +#: article.translate.xml:1029 msgid "" "pam_group8" msgstr "" "pam_group8" #. (itstool) path: section/para -#: article.translate.xml:1019 +#: article.translate.xml:1031 msgid "" "The pam_group8 module accepts or rejects applicants on the basis " "of their membership in a particular file group (normally wheel for su1). It is primarily intended for maintaining the " "traditional behavior of BSD su1, but has many other " "uses, such as excluding certain groups of users from a particular service." msgstr "" "O módulo pam_group8 aceita ou rejeita os requerentes com base em sua " "participação em um determinado grupo de arquivos (normalmente " "wheel para su1). Ele é destinado " "principalmente para manter o comportamento tradicional do " "su1 do BSD, mas tem muitos outros usos, como excluir determinados " "grupos de usuários de um serviço particular." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-guest.title -#: article.translate.xml:1028 +#: article.translate.xml:1040 msgid "" "pam_guest8" msgstr "" "pam_guest8" #. (itstool) path: section/para -#: article.translate.xml:1030 +#: article.translate.xml:1042 msgid "" "The pam_guest8 module allows guest logins using fixed login " "names. Various requirements can be placed on the password, but the default " "behavior is to allow any password as long as the login name is that of a " "guest account. The pam_guest8 module can easily be " "used to implement anonymous FTP logins." msgstr "" "O módulo pam_guest8 permite logins convidados usando nomes de login " "fixos. Vários requerimentos podem ser colocados na senha, mas o " "comportamento padrão é permitir qualquer senha, desde que o nome de login " "seja o de uma conta de convidado. O módulo " "pam_guest8 pode ser facilmente utilizado para implementar " "logins FTP anônimos." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-krb5.title -#: article.translate.xml:1039 +#: article.translate.xml:1051 msgid "" "pam_krb58" msgstr "" "pam_krb58" #. (itstool) path: section/para -#: article.translate.xml:1041 +#: article.translate.xml:1053 msgid "" "The pam_krb58 module" msgstr "" "O módulo pam_krb58" #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-ksu.title -#: article.translate.xml:1045 +#: article.translate.xml:1057 msgid "" "pam_ksu8" msgstr "" "pam_ksu8" #. (itstool) path: section/para -#: article.translate.xml:1047 +#: article.translate.xml:1059 msgid "" "The pam_ksu8 module" msgstr "" "O módulo pam_ksu8" #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-lastlog.title -#: article.translate.xml:1051 +#: article.translate.xml:1063 msgid "" "pam_lastlog8" msgstr "" "pam_lastlog8" #. (itstool) path: section/para -#: article.translate.xml:1053 +#: article.translate.xml:1065 msgid "" "The pam_lastlog8 module" msgstr "" "O módulo pam_lastlog8" #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-login-access.title -#: article.translate.xml:1057 +#: article.translate.xml:1069 msgid "" "pam_login_access8" msgstr "" "pam_login_access8" #. (itstool) path: section/para -#: article.translate.xml:1059 +#: article.translate.xml:1071 msgid "" "The pam_login_access8 module provides an " "implementation of the account management primitive which enforces the login " "restrictions specified in the login.access5 table." msgstr "" "O módulo pam_login_access8 fornece uma " "implementação da primitiva de gerenciamento de contas que impõe as " "restrições de login especificadas na tabela " "login.access5." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-nologin.title -#: article.translate.xml:1066 +#: article.translate.xml:1078 msgid "" "pam_nologin8" msgstr "" "pam_nologin8" #. (itstool) path: section/para -#: article.translate.xml:1068 +#: article.translate.xml:1080 msgid "" "The pam_nologin8 module refuses non-root logins when /var/" "run/nologin exists. This file is normally created by " "shutdown8 when less than five minutes remain until the " "scheduled shutdown time." msgstr "" "O módulo pam_nologin8 recusa logins não-root " "quando existe um /var/run/nologin. Este arquivo é " "normalmente criado por shutdown8 quando restam menos de " "cinco minutos até o horário de encerramento programado." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-opie.title -#: article.translate.xml:1075 +#: article.translate.xml:1087 msgid "" "pam_opie8" msgstr "" "pam_opie8" #. (itstool) path: section/para -#: article.translate.xml:1077 +#: article.translate.xml:1089 msgid "" "The pam_opie8 module implements the " "opie4 authentication method. The opie4 system is a challenge-" "response mechanism where the response to each challenge is a direct function " "of the challenge and a passphrase, so the response can be easily computed " "just in time by anyone possessing the passphrase, eliminating " "the need for password lists. Moreover, since " "opie4 never reuses a challenge that has been correctly answered, it " "is not vulnerable to replay attacks." msgstr "" "O módulo pam_opie8 implementa o método de autenticação " "opie4. O sistema opie4 é um mecanismo de " "desafio-resposta em que a resposta a cada desafio é uma função direta do " "desafio e uma frase-senha, então a resposta pode ser facilmente computada " "just in time por qualquer pessoa que possua a senha, " "eliminando a necessidade de listas de senhas. Além disso, como " "opie4 nunca reutiliza um desafio que tenha sido respondido " "corretamente, ele não é vulnerável a ataques de repetição." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-opieaccess.title -#: article.translate.xml:1089 +#: article.translate.xml:1101 msgid "" "pam_opieaccess8" msgstr "" "pam_opieaccess8" #. (itstool) path: section/para -#: article.translate.xml:1091 +#: article.translate.xml:1103 msgid "" "The pam_opieaccess8 module is a companion module to " "pam_opie8. Its purpose is to enforce the restrictions " "codified in opieaccess5, which regulate the " "conditions under which a user who would normally authenticate herself using " "opie4 is allowed to use alternate methods. This is most often used " "to prohibit the use of password authentication from untrusted hosts." msgstr "" "O módulo pam_opieaccess8 é um módulo " "complementar para pam_opie8. Sua finalidade é " "impor as restrições codificadas em opieaccess5, que regulam as " "condições sob as quais um usuário que normalmente se autenticaria usando " "opie4 tem permissão para usar métodos alternativos. Isso geralmente " "é usado para proibir o uso de autenticação de senha de hosts não confiáveis." #. (itstool) path: section/para -#: article.translate.xml:1099 +#: article.translate.xml:1111 msgid "" "In order to be effective, the pam_opieaccess8 module must be listed " "as requisite immediately after a sufficient entry for pam_opie8, and before any other " "modules, in the auth chain." msgstr "" "Para ser eficaz, o módulo pam_opieaccess8 deve ser listado como " "requisite imediatamente após uma entrada " "sufficient para pam_opie8, e antes de qualquer " "outro módulo, na chain auth." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-passwdqc.title -#: article.translate.xml:1107 +#: article.translate.xml:1119 msgid "" "pam_passwdqc8" msgstr "" "pam_passwdqc8" #. (itstool) path: section/para -#: article.translate.xml:1109 +#: article.translate.xml:1121 msgid "" "The pam_passwdqc8 module" msgstr "" "O módulo pam_passwdqc8" #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-permit.title -#: article.translate.xml:1113 +#: article.translate.xml:1125 msgid "" "pam_permit8" msgstr "" "pam_permit8" #. (itstool) path: section/para -#: article.translate.xml:1115 +#: article.translate.xml:1127 msgid "" "The pam_permit8 module is one of the simplest modules available; " "it responds to any request with PAM_SUCCESS. It is useful " "as a placeholder for services where one or more chains would otherwise be " "empty." msgstr "" "O módulo pam_permit8 é um dos módulos mais " "simples disponíveis; responde a qualquer pedido com PAM_SUCCESS. É útil como um espaço reservado para serviços onde uma ou mais " "chains estariam vazias." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-radius.title -#: article.translate.xml:1123 +#: article.translate.xml:1135 msgid "" "pam_radius8" msgstr "" "pam_radius8" #. (itstool) path: section/para -#: article.translate.xml:1125 +#: article.translate.xml:1137 msgid "" "The pam_radius8 module" msgstr "" "O módulo pam_radius8" #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-rhosts.title -#: article.translate.xml:1129 +#: article.translate.xml:1141 msgid "" "pam_rhosts8" msgstr "" "pam_rhosts8" #. (itstool) path: section/para -#: article.translate.xml:1131 +#: article.translate.xml:1143 msgid "" "The pam_rhosts8 module" msgstr "" "O módulo pam_rhosts8" #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-rootok.title -#: article.translate.xml:1135 +#: article.translate.xml:1147 msgid "" "pam_rootok8" msgstr "" "pam_rootok8" #. (itstool) path: section/para -#: article.translate.xml:1137 +#: article.translate.xml:1149 msgid "" "The pam_rootok8 module reports success if and only if the real " "user id of the process calling it (which is assumed to be run by the " "applicant) is 0. This is useful for non-networked services such as " "su1 or passwd1, to which the " "root should have automatic access." msgstr "" "O módulo pam_rootok8 reporta sucesso se e " "somente se o ID do usuário real do processo que o chama (que é assumido como " "sendo executado pelo requerente) é 0. Isso é útil para serviços que não " "estão em rede, como su1 ou " "passwd1, para o qual o root deve ter acesso " "automático." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-securetty.title -#: article.translate.xml:1146 +#: article.translate.xml:1158 msgid "" "pam_securetty8" msgstr "" "pam_securetty8" #. (itstool) path: section/para -#: article.translate.xml:1148 +#: article.translate.xml:1160 msgid "" "The pam_securetty8 module" msgstr "" "O módulo pam_securetty8" #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-self.title -#: article.translate.xml:1152 +#: article.translate.xml:1164 msgid "" "pam_self8" msgstr "" "pam_self8" #. (itstool) path: section/para -#: article.translate.xml:1154 +#: article.translate.xml:1166 msgid "" "The pam_self8 module reports success if and only if the names of " "the applicant matches that of the target account. It is most useful for non-" "networked services such as su1, where the identity of " "the applicant can be easily verified." msgstr "" "O módulo pam_self8 reporta sucesso se, e somente se, os nomes do " "requerente coincidem com os da conta de destino. É mais útil para serviços " "que não estão em rede, como su1, onde a identidade do " "requerente pode ser facilmente verificada." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-ssh.title -#: article.translate.xml:1162 +#: article.translate.xml:1174 msgid "" "pam_ssh8" msgstr "" "pam_ssh8" #. (itstool) path: section/para -#: article.translate.xml:1164 +#: article.translate.xml:1176 msgid "" "The pam_ssh8 module provides both authentication and session " "services. The authentication service allows users who have passphrase-" "protected SSH secret keys in their ~/.ssh directory to " "authenticate themselves by typing their passphrase. The session service " "starts ssh-agent1 and preloads it with the keys that were decrypted " "in the authentication phase. This feature is particularly useful for local " "logins, whether in X (using xdm1 or another PAM-aware X login manager) or at the console." msgstr "" "O módulo pam_ssh8 fornece serviços de autenticação e de sessão. O " "serviço de autenticação permite que os usuários que tenham chaves secretas " "SSH protegidas por senha em seu diretório ~/.ssh se " "autentiquem digitando sua frase secreta. O serviço de sessão inicia o " "ssh-agent1 e o pré-carrega com as chaves que foram " "descriptografadas na fase de autenticação. Esse recurso é particularmente " "útil para logins locais, seja em X (usando xdm1 ou outro gerenciador de login X que reconhece o PAM ) ou no " "console." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-tacplus.title -#: article.translate.xml:1177 +#: article.translate.xml:1189 msgid "" "pam_tacplus8" msgstr "" "pam_tacplus8" #. (itstool) path: section/para -#: article.translate.xml:1179 +#: article.translate.xml:1191 msgid "" "The pam_tacplus8 module" msgstr "" "O módulo pam_tacplus8" #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-modules-unix.title -#: article.translate.xml:1183 +#: article.translate.xml:1195 msgid "" "pam_unix8" msgstr "" "pam_unix8" #. (itstool) path: section/para -#: article.translate.xml:1185 +#: article.translate.xml:1197 msgid "" "The pam_unix8 module implements traditional UNIX password authentication, using " "getpwnam3 to obtain the target account's password and " "compare it with the one provided by the applicant. It also provides account " "management services (enforcing account and password expiration times) and " "password-changing services. This is probably the single most useful module, " "as the great majority of admins will want to maintain historical behavior " "for at least some services." msgstr "" "O módulo pam_unix8 implementa a autenticação de senha UNIX tradicional, usando " "getpwnam3 para obter a senha da conta de destino e compará-" "la com a fornecida pelo requerente. Ele também fornece serviços de " "gerenciamento de conta (impondo tempos de expiração de conta e senha) e " "serviços de alteração de senha. Este é provavelmente o módulo mais útil, já " "que a grande maioria dos administradores desejará manter um comportamento " "histórico para pelo menos alguns serviços." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-appl-prog.title -#: article.translate.xml:1198 +#: article.translate.xml:1210 msgid "PAM Application Programming" msgstr "Programação de Aplicação PAM" #. (itstool) path: section/para -#: article.translate.xml:1200 article.translate.xml:1220 +#: article.translate.xml:1213 article.translate.xml:1234 msgid "This section has not yet been written." msgstr "Esta seção ainda não foi escrita." #. (itstool) path: section/title #. (itstool) id: article.translate.xml#pam-module-prog.title -#: article.translate.xml:1218 +#: article.translate.xml:1231 msgid "PAM Module Programming" msgstr "Programação de Módulos PAM" #. (itstool) path: appendix/title #. (itstool) id: article.translate.xml#pam-sample-appl.title -#: article.translate.xml:1224 +#: article.translate.xml:1238 msgid "Sample PAM Application" msgstr "Exemplo de Aplicação PAM" #. (itstool) path: appendix/para -#: article.translate.xml:1226 +#: article.translate.xml:1241 msgid "" "The following is a minimal implementation of " "su1 using PAM. Note that it uses the OpenPAM-specific " "openpam_ttyconv3 conversation function, which is prototyped in " "security/openpam.h. If you wish build this application " "on a system with a different PAM library, you will have to provide your own " "conversation function. A robust conversation function is surprisingly " "difficult to implement; the one presented in is a good starting point, but should not be used in real-world " "applications." msgstr "" "O que vem a seguir é uma implementação mínima de " "su1 utilizando o PAM. Observe que ele usa a função de conversa " "openpam_ttyconv3 específica do OpenPAM, que é prototipada em " "security/openpam.h . Se você deseja construir este " "aplicativo em um sistema com uma biblioteca PAM diferente, você terá que " "fornecer sua própria função de conversação. Uma função de conversa robusta é " "surpreendentemente difícil de implementar; o apresentado em é um bom ponto de partida, mas não deve ser usado em " "aplicações do mundo real." #. (itstool) path: appendix/programlisting -#: article.translate.xml:1237 +#: article.translate.xml:1251 #, no-wrap msgid "" "/*-\n" " * Copyright (c) 2002,2003 Networks Associates Technology, Inc.\n" " * All rights reserved.\n" " *\n" " * This software was developed for the FreeBSD Project by ThinkSec AS and\n" " * Network Associates Laboratories, the Security Research Division of\n" " * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035\n" " * (\"CBOSS\"), as part of the DARPA CHATS research program.\n" " *\n" " * Redistribution and use in source and binary forms, with or without\n" " * modification, are permitted provided that the following conditions\n" " * are met:\n" " * 1. Redistributions of source code must retain the above copyright\n" " * notice, this list of conditions and the following disclaimer.\n" " * 2. Redistributions in binary form must reproduce the above copyright\n" " * notice, this list of conditions and the following disclaimer in the\n" " * documentation and/or other materials provided with the distribution.\n" " * 3. The name of the author may not be used to endorse or promote\n" " * products derived from this software without specific prior written\n" " * permission.\n" " *\n" " * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n" " * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" " * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n" " * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n" " * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n" " * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n" " * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n" " * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n" " * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n" " * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n" " * SUCH DAMAGE.\n" " *\n" " * $P4: //depot/projects/openpam/bin/su/su.c#10 $\n" " * $FreeBSD$\n" " */\n" "\n" "#include <sys/param.h>\n" "#include <sys/wait.h>\n" "\n" "#include <err.h>\n" "#include <pwd.h>\n" "#include <stdio.h>\n" "#include <stdlib.h>\n" "#include <string.h>\n" "#include <syslog.h>\n" "#include <unistd.h>\n" "\n" "#include <security/pam_appl.h>\n" "#include <security/openpam.h>\t/* for openpam_ttyconv() */\n" "\n" "extern char **environ;\n" "\n" "static pam_handle_t *pamh;\n" "static struct pam_conv pamc;\n" "\n" "static void\n" "usage(void)\n" "{\n" "\n" "\tfprintf(stderr, \"Usage: su [login [args]]\\n\");\n" "\texit(1);\n" "}\n" "\n" "int\n" "main(int argc, char *argv[])\n" "{\n" "\tchar hostname[MAXHOSTNAMELEN];\n" "\tconst char *user, *tty;\n" "\tchar **args, **pam_envlist, **pam_env;\n" "\tstruct passwd *pwd;\n" "\tint o, pam_err, status;\n" "\tpid_t pid;\n" "\n" "\twhile ((o = getopt(argc, argv, \"h\")) != -1)\n" "\t\tswitch (o) {\n" "\t\tcase 'h':\n" "\t\tdefault:\n" "\t\t\tusage();\n" "\t\t}\n" "\n" "\targc -= optind;\n" "\targv += optind;\n" "\n" "\tif (argc > 0) {\n" "\t\tuser = *argv;\n" "\t\t--argc;\n" "\t\t++argv;\n" "\t} else {\n" "\t\tuser = \"root\";\n" "\t}\n" "\n" "\t/* initialize PAM */\n" "\tpamc.conv = &openpam_ttyconv;\n" "\tpam_start(\"su\", user, &pamc, &pamh);\n" "\n" "\t/* set some items */\n" "\tgethostname(hostname, sizeof(hostname));\n" "\tif ((pam_err = pam_set_item(pamh, PAM_RHOST, hostname)) != PAM_SUCCESS)\n" "\t\tgoto pamerr;\n" "\tuser = getlogin();\n" "\tif ((pam_err = pam_set_item(pamh, PAM_RUSER, user)) != PAM_SUCCESS)\n" "\t\tgoto pamerr;\n" "\ttty = ttyname(STDERR_FILENO);\n" "\tif ((pam_err = pam_set_item(pamh, PAM_TTY, tty)) != PAM_SUCCESS)\n" "\t\tgoto pamerr;\n" "\n" "\t/* authenticate the applicant */\n" "\tif ((pam_err = pam_authenticate(pamh, 0)) != PAM_SUCCESS)\n" "\t\tgoto pamerr;\n" "\tif ((pam_err = pam_acct_mgmt(pamh, 0)) == PAM_NEW_AUTHTOK_REQD)\n" "\t\tpam_err = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK);\n" "\tif (pam_err != PAM_SUCCESS)\n" "\t\tgoto pamerr;\n" "\n" "\t/* establish the requested credentials */\n" "\tif ((pam_err = pam_setcred(pamh, PAM_ESTABLISH_CRED)) != PAM_SUCCESS)\n" "\t\tgoto pamerr;\n" "\n" "\t/* authentication succeeded; open a session */\n" "\tif ((pam_err = pam_open_session(pamh, 0)) != PAM_SUCCESS)\n" "\t\tgoto pamerr;\n" "\n" "\t/* get mapped user name; PAM may have changed it */\n" "\tpam_err = pam_get_item(pamh, PAM_USER, (const void **)&user);\n" "\tif (pam_err != PAM_SUCCESS || (pwd = getpwnam(user)) == NULL)\n" "\t\tgoto pamerr;\n" "\n" "\t/* export PAM environment */\n" "\tif ((pam_envlist = pam_getenvlist(pamh)) != NULL) {\n" "\t\tfor (pam_env = pam_envlist; *pam_env != NULL; ++pam_env) {\n" "\t\t\tputenv(*pam_env);\n" "\t\t\tfree(*pam_env);\n" "\t\t}\n" "\t\tfree(pam_envlist);\n" "\t}\n" "\n" "\t/* build argument list */\n" "\tif ((args = calloc(argc + 2, sizeof *args)) == NULL) {\n" "\t\twarn(\"calloc()\");\n" "\t\tgoto err;\n" "\t}\n" "\t*args = pwd->pw_shell;\n" "\tmemcpy(args + 1, argv, argc * sizeof *args);\n" "\n" "\t/* fork and exec */\n" "\tswitch ((pid = fork())) {\n" "\tcase -1:\n" "\t\twarn(\"fork()\");\n" "\t\tgoto err;\n" "\tcase 0:\n" "\t\t/* child: give up privs and start a shell */\n" "\n" "\t\t/* set uid and groups */\n" "\t\tif (initgroups(pwd->pw_name, pwd->pw_gid) == -1) {\n" "\t\t\twarn(\"initgroups()\");\n" "\t\t\t_exit(1);\n" "\t\t}\n" "\t\tif (setgid(pwd->pw_gid) == -1) {\n" "\t\t\twarn(\"setgid()\");\n" "\t\t\t_exit(1);\n" "\t\t}\n" "\t\tif (setuid(pwd->pw_uid) == -1) {\n" "\t\t\twarn(\"setuid()\");\n" "\t\t\t_exit(1);\n" "\t\t}\n" "\t\texecve(*args, args, environ);\n" "\t\twarn(\"execve()\");\n" "\t\t_exit(1);\n" "\tdefault:\n" "\t\t/* parent: wait for child to exit */\n" "\t\twaitpid(pid, &status, 0);\n" "\n" "\t\t/* close the session and release PAM resources */\n" "\t\tpam_err = pam_close_session(pamh, 0);\n" "\t\tpam_end(pamh, pam_err);\n" "\n" "\t\texit(WEXITSTATUS(status));\n" "\t}\n" "\n" "pamerr:\n" "\tfprintf(stderr, \"Sorry\\n\");\n" "err:\n" "\tpam_end(pamh, pam_err);\n" "\texit(1);\n" "}\n" msgstr "" "/*-\n" " * Copyright (c) 2002,2003 Networks Associates Technology, Inc.\n" " * All rights reserved.\n" " *\n" " * This software was developed for the FreeBSD Project by ThinkSec AS and\n" " * Network Associates Laboratories, the Security Research Division of\n" " * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035\n" " * (\"CBOSS\"), as part of the DARPA CHATS research program.\n" " *\n" " * Redistribution and use in source and binary forms, with or without\n" " * modification, are permitted provided that the following conditions\n" " * are met:\n" " * 1. Redistributions of source code must retain the above copyright\n" " * notice, this list of conditions and the following disclaimer.\n" " * 2. Redistributions in binary form must reproduce the above copyright\n" " * notice, this list of conditions and the following disclaimer in the\n" " * documentation and/or other materials provided with the distribution.\n" " * 3. The name of the author may not be used to endorse or promote\n" " * products derived from this software without specific prior written\n" " * permission.\n" " *\n" " * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n" " * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" " * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n" " * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n" " * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n" " * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n" " * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n" " * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n" " * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n" " * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n" " * SUCH DAMAGE.\n" " *\n" " * $P4: //depot/projects/openpam/bin/su/su.c#10 $\n" " * $FreeBSD$\n" " */\n" "\n" "#include <sys/param.h>\n" "#include <sys/wait.h>\n" "\n" "#include <err.h>\n" "#include <pwd.h>\n" "#include <stdio.h>\n" "#include <stdlib.h>\n" "#include <string.h>\n" "#include <syslog.h>\n" "#include <unistd.h>\n" "\n" "#include <security/pam_appl.h>\n" "#include <security/openpam.h>\t/* for openpam_ttyconv() */\n" "\n" "extern char **environ;\n" "\n" "static pam_handle_t *pamh;\n" "static struct pam_conv pamc;\n" "\n" "static void\n" "usage(void)\n" "{\n" "\n" "\tfprintf(stderr, \"Usage: su [login [args]]\\n\");\n" "\texit(1);\n" "}\n" "\n" "int\n" "main(int argc, char *argv[])\n" "{\n" "\tchar hostname[MAXHOSTNAMELEN];\n" "\tconst char *user, *tty;\n" "\tchar **args, **pam_envlist, **pam_env;\n" "\tstruct passwd *pwd;\n" "\tint o, pam_err, status;\n" "\tpid_t pid;\n" "\n" "\twhile ((o = getopt(argc, argv, \"h\")) != -1)\n" "\t\tswitch (o) {\n" "\t\tcase 'h':\n" "\t\tdefault:\n" "\t\t\tusage();\n" "\t\t}\n" "\n" "\targc -= optind;\n" "\targv += optind;\n" "\n" "\tif (argc > 0) {\n" "\t\tuser = *argv;\n" "\t\t--argc;\n" "\t\t++argv;\n" "\t} else {\n" "\t\tuser = \"root\";\n" "\t}\n" "\n" "\t/* initialize PAM */\n" "\tpamc.conv = &openpam_ttyconv;\n" "\tpam_start(\"su\", user, &pamc, &pamh);\n" "\n" "\t/* set some items */\n" "\tgethostname(hostname, sizeof(hostname));\n" "\tif ((pam_err = pam_set_item(pamh, PAM_RHOST, hostname)) != PAM_SUCCESS)\n" "\t\tgoto pamerr;\n" "\tuser = getlogin();\n" "\tif ((pam_err = pam_set_item(pamh, PAM_RUSER, user)) != PAM_SUCCESS)\n" "\t\tgoto pamerr;\n" "\ttty = ttyname(STDERR_FILENO);\n" "\tif ((pam_err = pam_set_item(pamh, PAM_TTY, tty)) != PAM_SUCCESS)\n" "\t\tgoto pamerr;\n" "\n" "\t/* authenticate the applicant */\n" "\tif ((pam_err = pam_authenticate(pamh, 0)) != PAM_SUCCESS)\n" "\t\tgoto pamerr;\n" "\tif ((pam_err = pam_acct_mgmt(pamh, 0)) == PAM_NEW_AUTHTOK_REQD)\n" "\t\tpam_err = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK);\n" "\tif (pam_err != PAM_SUCCESS)\n" "\t\tgoto pamerr;\n" "\n" "\t/* establish the requested credentials */\n" "\tif ((pam_err = pam_setcred(pamh, PAM_ESTABLISH_CRED)) != PAM_SUCCESS)\n" "\t\tgoto pamerr;\n" "\n" "\t/* authentication succeeded; open a session */\n" "\tif ((pam_err = pam_open_session(pamh, 0)) != PAM_SUCCESS)\n" "\t\tgoto pamerr;\n" "\n" "\t/* get mapped user name; PAM may have changed it */\n" "\tpam_err = pam_get_item(pamh, PAM_USER, (const void **)&user);\n" "\tif (pam_err != PAM_SUCCESS || (pwd = getpwnam(user)) == NULL)\n" "\t\tgoto pamerr;\n" "\n" "\t/* export PAM environment */\n" "\tif ((pam_envlist = pam_getenvlist(pamh)) != NULL) {\n" "\t\tfor (pam_env = pam_envlist; *pam_env != NULL; ++pam_env) {\n" "\t\t\tputenv(*pam_env);\n" "\t\t\tfree(*pam_env);\n" "\t\t}\n" "\t\tfree(pam_envlist);\n" "\t}\n" "\n" "\t/* build argument list */\n" "\tif ((args = calloc(argc + 2, sizeof *args)) == NULL) {\n" "\t\twarn(\"calloc()\");\n" "\t\tgoto err;\n" "\t}\n" "\t*args = pwd->pw_shell;\n" "\tmemcpy(args + 1, argv, argc * sizeof *args);\n" "\n" "\t/* fork and exec */\n" "\tswitch ((pid = fork())) {\n" "\tcase -1:\n" "\t\twarn(\"fork()\");\n" "\t\tgoto err;\n" "\tcase 0:\n" "\t\t/* child: give up privs and start a shell */\n" "\n" "\t\t/* set uid and groups */\n" "\t\tif (initgroups(pwd->pw_name, pwd->pw_gid) == -1) {\n" "\t\t\twarn(\"initgroups()\");\n" "\t\t\t_exit(1);\n" "\t\t}\n" "\t\tif (setgid(pwd->pw_gid) == -1) {\n" "\t\t\twarn(\"setgid()\");\n" "\t\t\t_exit(1);\n" "\t\t}\n" "\t\tif (setuid(pwd->pw_uid) == -1) {\n" "\t\t\twarn(\"setuid()\");\n" "\t\t\t_exit(1);\n" "\t\t}\n" "\t\texecve(*args, args, environ);\n" "\t\twarn(\"execve()\");\n" "\t\t_exit(1);\n" "\tdefault:\n" "\t\t/* parent: wait for child to exit */\n" "\t\twaitpid(pid, &status, 0);\n" "\n" "\t\t/* close the session and release PAM resources */\n" "\t\tpam_err = pam_close_session(pamh, 0);\n" "\t\tpam_end(pamh, pam_err);\n" "\n" "\t\texit(WEXITSTATUS(status));\n" "\t}\n" "\n" "pamerr:\n" "\tfprintf(stderr, \"Sorry\\n\");\n" "err:\n" "\tpam_end(pamh, pam_err);\n" "\texit(1);\n" "}\n" #. (itstool) path: appendix/title #. (itstool) id: article.translate.xml#pam-sample-module.title -#: article.translate.xml:1427 +#: article.translate.xml:1441 msgid "Sample PAM Module" msgstr "Exemplo do módulo PAM" #. (itstool) path: appendix/para -#: article.translate.xml:1429 +#: article.translate.xml:1443 msgid "" "The following is a minimal implementation of " "pam_unix8, offering only authentication services. It should " "build and run with most PAM implementations, but takes advantage of OpenPAM " "extensions if available: note the use of " "pam_get_authtok3, which enormously simplifies prompting the user " "for a password." msgstr "" "Segue-se uma implementação mínima de pam_unix8, oferecendo apenas " "serviços de autenticação. Ele deve ser compilado e executado com a maioria " "das implementações do PAM, mas aproveita as extensões do OpenPAM, se " "disponível: observe o uso de pam_get_authtok3, que simplifica " "enormemente solicitando ao usuário uma senha." #. (itstool) path: appendix/programlisting -#: article.translate.xml:1436 +#: article.translate.xml:1450 #, no-wrap msgid "" "/*-\n" " * Copyright (c) 2002 Networks Associates Technology, Inc.\n" " * All rights reserved.\n" " *\n" " * This software was developed for the FreeBSD Project by ThinkSec AS and\n" " * Network Associates Laboratories, the Security Research Division of\n" " * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035\n" " * (\"CBOSS\"), as part of the DARPA CHATS research program.\n" " *\n" " * Redistribution and use in source and binary forms, with or without\n" " * modification, are permitted provided that the following conditions\n" " * are met:\n" " * 1. Redistributions of source code must retain the above copyright\n" " * notice, this list of conditions and the following disclaimer.\n" " * 2. Redistributions in binary form must reproduce the above copyright\n" " * notice, this list of conditions and the following disclaimer in the\n" " * documentation and/or other materials provided with the distribution.\n" " * 3. The name of the author may not be used to endorse or promote\n" " * products derived from this software without specific prior written\n" " * permission.\n" " *\n" " * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n" " * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" " * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n" " * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n" " * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n" " * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n" " * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n" " * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n" " * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n" " * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n" " * SUCH DAMAGE.\n" " *\n" " * $P4: //depot/projects/openpam/modules/pam_unix/pam_unix.c#3 $\n" " * $FreeBSD$\n" " */\n" "\n" "#include <sys/param.h>\n" "\n" "#include <pwd.h>\n" "#include <stdlib.h>\n" "#include <stdio.h>\n" "#include <string.h>\n" "#include <unistd.h>\n" "\n" "#include <security/pam_modules.h>\n" "#include <security/pam_appl.h>\n" "\n" "#ifndef _OPENPAM\n" "static char password_prompt[] = \"Password:\";\n" "#endif\n" "\n" "#ifndef PAM_EXTERN\n" "#define PAM_EXTERN\n" "#endif\n" "\n" "PAM_EXTERN int\n" "pam_sm_authenticate(pam_handle_t *pamh, int flags,\n" "\tint argc, const char *argv[])\n" "{\n" "#ifndef _OPENPAM\n" "\tstruct pam_conv *conv;\n" "\tstruct pam_message msg;\n" "\tconst struct pam_message *msgp;\n" "\tstruct pam_response *resp;\n" "#endif\n" "\tstruct passwd *pwd;\n" "\tconst char *user;\n" "\tchar *crypt_password, *password;\n" "\tint pam_err, retry;\n" "\n" "\t/* identify user */\n" "\tif ((pam_err = pam_get_user(pamh, &user, NULL)) != PAM_SUCCESS)\n" "\t\treturn (pam_err);\n" "\tif ((pwd = getpwnam(user)) == NULL)\n" "\t\treturn (PAM_USER_UNKNOWN);\n" "\n" "\t/* get password */\n" "#ifndef _OPENPAM\n" "\tpam_err = pam_get_item(pamh, PAM_CONV, (const void **)&conv);\n" "\tif (pam_err != PAM_SUCCESS)\n" "\t\treturn (PAM_SYSTEM_ERR);\n" "\tmsg.msg_style = PAM_PROMPT_ECHO_OFF;\n" "\tmsg.msg = password_prompt;\n" "\tmsgp = &msg;\n" "#endif\n" "\tfor (retry = 0; retry < 3; ++retry) {\n" "#ifdef _OPENPAM\n" "\t\tpam_err = pam_get_authtok(pamh, PAM_AUTHTOK,\n" "\t\t (const char **)&password, NULL);\n" "#else\n" "\t\tresp = NULL;\n" "\t\tpam_err = (*conv->conv)(1, &msgp, &resp, conv->appdata_ptr);\n" "\t\tif (resp != NULL) {\n" "\t\t\tif (pam_err == PAM_SUCCESS)\n" "\t\t\t\tpassword = resp->resp;\n" "\t\t\telse\n" "\t\t\t\tfree(resp->resp);\n" "\t\t\tfree(resp);\n" "\t\t}\n" "#endif\n" "\t\tif (pam_err == PAM_SUCCESS)\n" "\t\t\tbreak;\n" "\t}\n" "\tif (pam_err == PAM_CONV_ERR)\n" "\t\treturn (pam_err);\n" "\tif (pam_err != PAM_SUCCESS)\n" "\t\treturn (PAM_AUTH_ERR);\n" "\n" "\t/* compare passwords */\n" "\tif ((!pwd->pw_passwd[0] && (flags & PAM_DISALLOW_NULL_AUTHTOK)) ||\n" "\t (crypt_password = crypt(password, pwd->pw_passwd)) == NULL ||\n" "\t strcmp(crypt_password, pwd->pw_passwd) != 0)\n" "\t\tpam_err = PAM_AUTH_ERR;\n" "\telse\n" "\t\tpam_err = PAM_SUCCESS;\n" "#ifndef _OPENPAM\n" "\tfree(password);\n" "#endif\n" "\treturn (pam_err);\n" "}\n" "\n" "PAM_EXTERN int\n" "pam_sm_setcred(pam_handle_t *pamh, int flags,\n" "\tint argc, const char *argv[])\n" "{\n" "\n" "\treturn (PAM_SUCCESS);\n" "}\n" "\n" "PAM_EXTERN int\n" "pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,\n" "\tint argc, const char *argv[])\n" "{\n" "\n" "\treturn (PAM_SUCCESS);\n" "}\n" "\n" "PAM_EXTERN int\n" "pam_sm_open_session(pam_handle_t *pamh, int flags,\n" "\tint argc, const char *argv[])\n" "{\n" "\n" "\treturn (PAM_SUCCESS);\n" "}\n" "\n" "PAM_EXTERN int\n" "pam_sm_close_session(pam_handle_t *pamh, int flags,\n" "\tint argc, const char *argv[])\n" "{\n" "\n" "\treturn (PAM_SUCCESS);\n" "}\n" "\n" "PAM_EXTERN int\n" "pam_sm_chauthtok(pam_handle_t *pamh, int flags,\n" "\tint argc, const char *argv[])\n" "{\n" "\n" "\treturn (PAM_SERVICE_ERR);\n" "}\n" "\n" "#ifdef PAM_MODULE_ENTRY\n" "PAM_MODULE_ENTRY(\"pam_unix\");\n" "#endif\n" msgstr "" "/*-\n" " * Copyright (c) 2002 Networks Associates Technology, Inc.\n" " * All rights reserved.\n" " *\n" " * This software was developed for the FreeBSD Project by ThinkSec AS and\n" " * Network Associates Laboratories, the Security Research Division of\n" " * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035\n" " * (\"CBOSS\"), as part of the DARPA CHATS research program.\n" " *\n" " * Redistribution and use in source and binary forms, with or without\n" " * modification, are permitted provided that the following conditions\n" " * are met:\n" " * 1. Redistributions of source code must retain the above copyright\n" " * notice, this list of conditions and the following disclaimer.\n" " * 2. Redistributions in binary form must reproduce the above copyright\n" " * notice, this list of conditions and the following disclaimer in the\n" " * documentation and/or other materials provided with the distribution.\n" " * 3. The name of the author may not be used to endorse or promote\n" " * products derived from this software without specific prior written\n" " * permission.\n" " *\n" " * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n" " * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" " * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n" " * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n" " * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n" " * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n" " * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n" " * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n" " * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n" " * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n" " * SUCH DAMAGE.\n" " *\n" " * $P4: //depot/projects/openpam/modules/pam_unix/pam_unix.c#3 $\n" " * $FreeBSD$\n" " */\n" "\n" "#include <sys/param.h>\n" "\n" "#include <pwd.h>\n" "#include <stdlib.h>\n" "#include <stdio.h>\n" "#include <string.h>\n" "#include <unistd.h>\n" "\n" "#include <security/pam_modules.h>\n" "#include <security/pam_appl.h>\n" "\n" "#ifndef _OPENPAM\n" "static char password_prompt[] = \"Password:\";\n" "#endif\n" "\n" "#ifndef PAM_EXTERN\n" "#define PAM_EXTERN\n" "#endif\n" "\n" "PAM_EXTERN int\n" "pam_sm_authenticate(pam_handle_t *pamh, int flags,\n" "\tint argc, const char *argv[])\n" "{\n" "#ifndef _OPENPAM\n" "\tstruct pam_conv *conv;\n" "\tstruct pam_message msg;\n" "\tconst struct pam_message *msgp;\n" "\tstruct pam_response *resp;\n" "#endif\n" "\tstruct passwd *pwd;\n" "\tconst char *user;\n" "\tchar *crypt_password, *password;\n" "\tint pam_err, retry;\n" "\n" "\t/* identify user */\n" "\tif ((pam_err = pam_get_user(pamh, &user, NULL)) != PAM_SUCCESS)\n" "\t\treturn (pam_err);\n" "\tif ((pwd = getpwnam(user)) == NULL)\n" "\t\treturn (PAM_USER_UNKNOWN);\n" "\n" "\t/* get password */\n" "#ifndef _OPENPAM\n" "\tpam_err = pam_get_item(pamh, PAM_CONV, (const void **)&conv);\n" "\tif (pam_err != PAM_SUCCESS)\n" "\t\treturn (PAM_SYSTEM_ERR);\n" "\tmsg.msg_style = PAM_PROMPT_ECHO_OFF;\n" "\tmsg.msg = password_prompt;\n" "\tmsgp = &msg;\n" "#endif\n" "\tfor (retry = 0; retry < 3; ++retry) {\n" "#ifdef _OPENPAM\n" "\t\tpam_err = pam_get_authtok(pamh, PAM_AUTHTOK,\n" "\t\t (const char **)&password, NULL);\n" "#else\n" "\t\tresp = NULL;\n" "\t\tpam_err = (*conv->conv)(1, &msgp, &resp, conv->appdata_ptr);\n" "\t\tif (resp != NULL) {\n" "\t\t\tif (pam_err == PAM_SUCCESS)\n" "\t\t\t\tpassword = resp->resp;\n" "\t\t\telse\n" "\t\t\t\tfree(resp->resp);\n" "\t\t\tfree(resp);\n" "\t\t}\n" "#endif\n" "\t\tif (pam_err == PAM_SUCCESS)\n" "\t\t\tbreak;\n" "\t}\n" "\tif (pam_err == PAM_CONV_ERR)\n" "\t\treturn (pam_err);\n" "\tif (pam_err != PAM_SUCCESS)\n" "\t\treturn (PAM_AUTH_ERR);\n" "\n" "\t/* compare passwords */\n" "\tif ((!pwd->pw_passwd[0] && (flags & PAM_DISALLOW_NULL_AUTHTOK)) ||\n" "\t (crypt_password = crypt(password, pwd->pw_passwd)) == NULL ||\n" "\t strcmp(crypt_password, pwd->pw_passwd) != 0)\n" "\t\tpam_err = PAM_AUTH_ERR;\n" "\telse\n" "\t\tpam_err = PAM_SUCCESS;\n" "#ifndef _OPENPAM\n" "\tfree(password);\n" "#endif\n" "\treturn (pam_err);\n" "}\n" "\n" "PAM_EXTERN int\n" "pam_sm_setcred(pam_handle_t *pamh, int flags,\n" "\tint argc, const char *argv[])\n" "{\n" "\n" "\treturn (PAM_SUCCESS);\n" "}\n" "\n" "PAM_EXTERN int\n" "pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,\n" "\tint argc, const char *argv[])\n" "{\n" "\n" "\treturn (PAM_SUCCESS);\n" "}\n" "\n" "PAM_EXTERN int\n" "pam_sm_open_session(pam_handle_t *pamh, int flags,\n" "\tint argc, const char *argv[])\n" "{\n" "\n" "\treturn (PAM_SUCCESS);\n" "}\n" "\n" "PAM_EXTERN int\n" "pam_sm_close_session(pam_handle_t *pamh, int flags,\n" "\tint argc, const char *argv[])\n" "{\n" "\n" "\treturn (PAM_SUCCESS);\n" "}\n" "\n" "PAM_EXTERN int\n" "pam_sm_chauthtok(pam_handle_t *pamh, int flags,\n" "\tint argc, const char *argv[])\n" "{\n" "\n" "\treturn (PAM_SERVICE_ERR);\n" "}\n" "\n" "#ifdef PAM_MODULE_ENTRY\n" "PAM_MODULE_ENTRY(\"pam_unix\");\n" "#endif\n" #. (itstool) path: appendix/title #. (itstool) id: article.translate.xml#pam-sample-conv.title -#: article.translate.xml:1605 +#: article.translate.xml:1619 msgid "Sample PAM Conversation Function" msgstr "Exemplo de função de conversação PAM" #. (itstool) path: appendix/para -#: article.translate.xml:1608 +#: article.translate.xml:1622 msgid "" "The conversation function presented below is a greatly simplified version of " "OpenPAM's openpam_ttyconv3. It is fully " "functional, and should give the reader a good idea of how a conversation " "function should behave, but it is far too simple for real-world use. Even if " "you are not using OpenPAM, feel free to download the source code and adapt " "openpam_ttyconv3 to your uses; we believe it to be as robust as a " "tty-oriented conversation function can reasonably get." msgstr "" "A função de conversação apresentada abaixo é uma versão bastante " "simplificada do openpam_ttyconv do OpenPAM. Ele é " "totalmente funcional e deve dar ao leitor uma boa ideia de como uma função " "de conversa deve se comportar, mas é simples demais para uso no mundo real. " "Mesmo se você não estiver usando o OpenPAM, sinta-se à vontade para baixar o " "código-fonte e adaptar openpam_ttyconv3 aos seus usos; " "acreditamos que seja tão robusto quanto uma função de conversa orientada " "para tty pode razoavelmente ser." #. (itstool) path: appendix/programlisting -#: article.translate.xml:1617 +#: article.translate.xml:1632 #, no-wrap msgid "" "/*-\n" " * Copyright (c) 2002 Networks Associates Technology, Inc.\n" " * All rights reserved.\n" " *\n" " * This software was developed for the FreeBSD Project by ThinkSec AS and\n" " * Network Associates Laboratories, the Security Research Division of\n" " * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035\n" " * (\"CBOSS\"), as part of the DARPA CHATS research program.\n" " *\n" " * Redistribution and use in source and binary forms, with or without\n" " * modification, are permitted provided that the following conditions\n" " * are met:\n" " * 1. Redistributions of source code must retain the above copyright\n" " * notice, this list of conditions and the following disclaimer.\n" " * 2. Redistributions in binary form must reproduce the above copyright\n" " * notice, this list of conditions and the following disclaimer in the\n" " * documentation and/or other materials provided with the distribution.\n" " * 3. The name of the author may not be used to endorse or promote\n" " * products derived from this software without specific prior written\n" " * permission.\n" " *\n" " * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n" " * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" " * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n" " * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n" " * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n" " * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n" " * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n" " * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n" " * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n" " * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n" " * SUCH DAMAGE.\n" " *\n" " * $FreeBSD$\n" " */\n" "\n" "#include <stdio.h>\n" "#include <stdlib.h>\n" "#include <string.h>\n" "#include <unistd.h>\n" "\n" "#include <security/pam_appl.h>\n" "\n" "int\n" "converse(int n, const struct pam_message **msg,\n" "\tstruct pam_response **resp, void *data)\n" "{\n" "\tstruct pam_response *aresp;\n" "\tchar buf[PAM_MAX_RESP_SIZE];\n" "\tint i;\n" "\n" "\tdata = data;\n" "\tif (n <= 0 || n > PAM_MAX_NUM_MSG)\n" "\t\treturn (PAM_CONV_ERR);\n" "\tif ((aresp = calloc(n, sizeof *aresp)) == NULL)\n" "\t\treturn (PAM_BUF_ERR);\n" "\tfor (i = 0; i < n; ++i) {\n" "\t\taresp[i].resp_retcode = 0;\n" "\t\taresp[i].resp = NULL;\n" "\t\tswitch (msg[i]->msg_style) {\n" "\t\tcase PAM_PROMPT_ECHO_OFF:\n" "\t\t\taresp[i].resp = strdup(getpass(msg[i]->msg));\n" "\t\t\tif (aresp[i].resp == NULL)\n" "\t\t\t\tgoto fail;\n" "\t\t\tbreak;\n" "\t\tcase PAM_PROMPT_ECHO_ON:\n" "\t\t\tfputs(msg[i]->msg, stderr);\n" "\t\t\tif (fgets(buf, sizeof buf, stdin) == NULL)\n" "\t\t\t\tgoto fail;\n" "\t\t\taresp[i].resp = strdup(buf);\n" "\t\t\tif (aresp[i].resp == NULL)\n" "\t\t\t\tgoto fail;\n" "\t\t\tbreak;\n" "\t\tcase PAM_ERROR_MSG:\n" "\t\t\tfputs(msg[i]->msg, stderr);\n" "\t\t\tif (strlen(msg[i]->msg) > 0 &&\n" "\t\t\t msg[i]->msg[strlen(msg[i]->msg) - 1] != '\\n')\n" "\t\t\t\tfputc('\\n', stderr);\n" "\t\t\tbreak;\n" "\t\tcase PAM_TEXT_INFO:\n" "\t\t\tfputs(msg[i]->msg, stdout);\n" "\t\t\tif (strlen(msg[i]->msg) > 0 &&\n" "\t\t\t msg[i]->msg[strlen(msg[i]->msg) - 1] != '\\n')\n" "\t\t\t\tfputc('\\n', stdout);\n" "\t\t\tbreak;\n" "\t\tdefault:\n" "\t\t\tgoto fail;\n" "\t\t}\n" "\t}\n" "\t*resp = aresp;\n" "\treturn (PAM_SUCCESS);\n" " fail:\n" " for (i = 0; i < n; ++i) {\n" " if (aresp[i].resp != NULL) {\n" " memset(aresp[i].resp, 0, strlen(aresp[i].resp));\n" " free(aresp[i].resp);\n" " }\n" " }\n" " memset(aresp, 0, n * sizeof *aresp);\n" "\t*resp = NULL;\n" "\treturn (PAM_CONV_ERR);\n" "}\n" msgstr "" "/*-\n" " * Copyright (c) 2002 Networks Associates Technology, Inc.\n" " * All rights reserved.\n" " *\n" " * This software was developed for the FreeBSD Project by ThinkSec AS and\n" " * Network Associates Laboratories, the Security Research Division of\n" " * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035\n" " * (\"CBOSS\"), as part of the DARPA CHATS research program.\n" " *\n" " * Redistribution and use in source and binary forms, with or without\n" " * modification, are permitted provided that the following conditions\n" " * are met:\n" " * 1. Redistributions of source code must retain the above copyright\n" " * notice, this list of conditions and the following disclaimer.\n" " * 2. Redistributions in binary form must reproduce the above copyright\n" " * notice, this list of conditions and the following disclaimer in the\n" " * documentation and/or other materials provided with the distribution.\n" " * 3. The name of the author may not be used to endorse or promote\n" " * products derived from this software without specific prior written\n" " * permission.\n" " *\n" " * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n" " * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" " * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n" " * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n" " * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n" " * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n" " * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n" " * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n" " * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n" " * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n" " * SUCH DAMAGE.\n" " *\n" " * $FreeBSD$\n" " */\n" "\n" "#include <stdio.h>\n" "#include <stdlib.h>\n" "#include <string.h>\n" "#include <unistd.h>\n" "\n" "#include <security/pam_appl.h>\n" "\n" "int\n" "converse(int n, const struct pam_message **msg,\n" "\tstruct pam_response **resp, void *data)\n" "{\n" "\tstruct pam_response *aresp;\n" "\tchar buf[PAM_MAX_RESP_SIZE];\n" "\tint i;\n" "\n" "\tdata = data;\n" "\tif (n <= 0 || n > PAM_MAX_NUM_MSG)\n" "\t\treturn (PAM_CONV_ERR);\n" "\tif ((aresp = calloc(n, sizeof *aresp)) == NULL)\n" "\t\treturn (PAM_BUF_ERR);\n" "\tfor (i = 0; i < n; ++i) {\n" "\t\taresp[i].resp_retcode = 0;\n" "\t\taresp[i].resp = NULL;\n" "\t\tswitch (msg[i]->msg_style) {\n" "\t\tcase PAM_PROMPT_ECHO_OFF:\n" "\t\t\taresp[i].resp = strdup(getpass(msg[i]->msg));\n" "\t\t\tif (aresp[i].resp == NULL)\n" "\t\t\t\tgoto fail;\n" "\t\t\tbreak;\n" "\t\tcase PAM_PROMPT_ECHO_ON:\n" "\t\t\tfputs(msg[i]->msg, stderr);\n" "\t\t\tif (fgets(buf, sizeof buf, stdin) == NULL)\n" "\t\t\t\tgoto fail;\n" "\t\t\taresp[i].resp = strdup(buf);\n" "\t\t\tif (aresp[i].resp == NULL)\n" "\t\t\t\tgoto fail;\n" "\t\t\tbreak;\n" "\t\tcase PAM_ERROR_MSG:\n" "\t\t\tfputs(msg[i]->msg, stderr);\n" "\t\t\tif (strlen(msg[i]->msg) > 0 &&\n" "\t\t\t msg[i]->msg[strlen(msg[i]->msg) - 1] != '\\n')\n" "\t\t\t\tfputc('\\n', stderr);\n" "\t\t\tbreak;\n" "\t\tcase PAM_TEXT_INFO:\n" "\t\t\tfputs(msg[i]->msg, stdout);\n" "\t\t\tif (strlen(msg[i]->msg) > 0 &&\n" "\t\t\t msg[i]->msg[strlen(msg[i]->msg) - 1] != '\\n')\n" "\t\t\t\tfputc('\\n', stdout);\n" "\t\t\tbreak;\n" "\t\tdefault:\n" "\t\t\tgoto fail;\n" "\t\t}\n" "\t}\n" "\t*resp = aresp;\n" "\treturn (PAM_SUCCESS);\n" " fail:\n" " for (i = 0; i < n; ++i) {\n" " if (aresp[i].resp != NULL) {\n" " memset(aresp[i].resp, 0, strlen(aresp[i].resp));\n" " free(aresp[i].resp);\n" " }\n" " }\n" " memset(aresp, 0, n * sizeof *aresp);\n" "\t*resp = NULL;\n" "\treturn (PAM_CONV_ERR);\n" "}\n" #. (itstool) path: info/title #. (itstool) id: article.translate.xml#pam-further.title -#: article.translate.xml:1723 +#: article.translate.xml:1739 msgid "Further Reading" msgstr "Leitura Adicional" #. (itstool) path: abstract/para -#: article.translate.xml:1727 +#: article.translate.xml:1742 msgid "" "This is a list of documents relevant to PAM and related issues. It is by no " "means complete." msgstr "" "Esta é uma lista de documentos relevantes para o PAM e questões " "relacionadas. Não está de modo algum completo." #. (itstool) path: bibliodiv/title -#: article.translate.xml:1733 +#: article.translate.xml:1748 msgid "Papers" msgstr "Papers" #. (itstool) path: biblioentry/citetitle -#: article.translate.xml:1736 +#: article.translate.xml:1751 msgid "" " Making Login Services Independent of Authentication Technologies" msgstr "" "Tornando os serviços de login independentes das tecnologias de " "autenticação" #. (itstool) path: authorgroup/author -#: article.translate.xml:1740 +#: article.translate.xml:1755 msgid "" -"SamarVipin" +" Samar Vipin " msgstr "" -"SamarVipin" +" Samar Vipin " #. (itstool) path: authorgroup/author -#: article.translate.xml:1741 +#: article.translate.xml:1761 msgid "" -"LaiCharlie" +" Lai Charlie " msgstr "" -"LaiCharlie" +" Lai Charlie " #. (itstool) path: biblioentry/orgname -#: article.translate.xml:1743 article.translate.xml:1768 -#: article.translate.xml:1788 +#: article.translate.xml:1768 article.translate.xml:1800 +#: article.translate.xml:1834 msgid "Sun Microsystems" msgstr "Sun Microsystems" #. (itstool) path: biblioentry/citetitle -#: article.translate.xml:1747 +#: article.translate.xml:1772 msgid "" "X/Open " "Single Sign-on Preliminary Specification" msgstr "" "Especificação Preliminar do X/Open Single Sign-on" #. (itstool) path: biblioentry/orgname -#: article.translate.xml:1749 +#: article.translate.xml:1775 msgid "The Open Group" msgstr "O grupo aberto" #. (itstool) path: biblioentry/biblioid -#: article.translate.xml:1750 +#: article.translate.xml:1776 msgid "1-85912-144-6" msgstr "1-85912-144-6" #. (itstool) path: biblioentry/pubdate -#: article.translate.xml:1751 +#: article.translate.xml:1777 msgid "June 1997" msgstr "Junho de 1997" #. (itstool) path: biblioentry/citetitle -#: article.translate.xml:1755 +#: article.translate.xml:1781 msgid "" " Pluggable Authentication Modules" msgstr "" "Módulos de autenticação plugáveis​​" #. (itstool) path: biblioentry/author -#: article.translate.xml:1757 article.translate.xml:1783 +#: article.translate.xml:1783 article.translate.xml:1822 msgid "" -"MorganAndrewG." +" Morgan Andrew " +"G. " msgstr "" -"MorganAndrewG." +" Morgan Andrew " +"G. " #. (itstool) path: biblioentry/pubdate -#: article.translate.xml:1758 +#: article.translate.xml:1790 msgid "1999-10-06" msgstr "06-10-1999" #. (itstool) path: bibliodiv/title -#: article.translate.xml:1763 +#: article.translate.xml:1795 msgid "User Manuals" msgstr "Manuais do usuário" #. (itstool) path: biblioentry/citetitle -#: article.translate.xml:1766 +#: article.translate.xml:1798 msgid "" "PAM Administration" msgstr "" "Administração do PAM" #. (itstool) path: bibliodiv/title -#: article.translate.xml:1773 -msgid "Related Web pages" -msgstr "Páginas Web relacionadas" +#: article.translate.xml:1805 +msgid "Related Web Pages" +msgstr "Páginas Web Relacionadas" #. (itstool) path: biblioentry/citetitle -#: article.translate.xml:1776 +#: article.translate.xml:1808 msgid "" "OpenPAM homepage" msgstr "" "Homepage do OpenPAM" #. (itstool) path: biblioentry/author -#: article.translate.xml:1777 +#: article.translate.xml:1810 msgid "" -"SmørgravDag-Erling Smørgrav Dag-Erling " msgstr "" -"SmørgravDag-Erling Smørgrav Dag-Erling " #. (itstool) path: biblioentry/orgname -#: article.translate.xml:1778 +#: article.translate.xml:1816 msgid "ThinkSec AS" msgstr "ThinkSec AS" #. (itstool) path: biblioentry/citetitle -#: article.translate.xml:1782 +#: article.translate.xml:1820 msgid "" "Linux-PAM " "homepage" msgstr "" "Página " "inicial do Linux-PAM" #. (itstool) path: biblioentry/citetitle -#: article.translate.xml:1787 +#: article.translate.xml:1832 msgid "" "Solaris PAM " "homepage" msgstr "" "Página " "inicial do Solaris PAM"