Linux PPP protocol development
 help / color / mirror / Atom feed
From: "cyx" <cyx@fiberhome.com.cn>
To: linux-ppp@vger.kernel.org
Subject: Re: Re: from which hook , I can get the usrname that pppd used?
Date: Thu, 15 May 2008 14:53:26 +0000	[thread overview]
Message-ID: <200805152253262655367@fiberhome.com.cn> (raw)
In-Reply-To: <200805151619318592147@foxmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1788 bytes --]

Thank for your help! username that  I want to get is the one pppd  read from chap-secret or pap-secret, I think they my be store in an global var?



2008-05-15 



cyx 



·¢¼þÈË£º James Carlson 
·¢ËÍʱ¼ä£º 2008-05-15  21:56:09 
ÊÕ¼þÈË£º cyx_mail 
³­ËÍ£º linux-ppp 
Ö÷Ì⣺ Re: from which hook , I can get the usrname that pppd used? 
 
cyx_mail writes:
> from which hook , I can get the usrname that pppd used? both chap or pap, is that a same hook?
What "user name" do you want?  Inside of a script, pppd sets a bunch
of environment variables, which are documented in the "SCRIPTS"
section of the man page.  (You've read through the man page, correct?)
If the peer authenticates itself, then PEERNAME will be set.  The
variables ORIG_UID and PPPLOGNAME have the invoking user's UID and
name.  The local 'name' value in use (the our_name[] array) isn't put
into the environment.  Perhaps it could be.
If you're not talking about a script, but are instead talking about a
pppd plugin, then you can just reference the variables you want --
our_name[] or peer_authname[].
It's possible that you may need to provide more details about what
you're attempting to do, what you've already tried to do, and what
doesn't work in order to get more substantial guidance.
-- 
James Carlson         42.703N 71.076W         <carlsonj@workingcode.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
__________ NOD32 3040 (20080419) Information __________
This message was checked by NOD32 antivirus system.
http://www.nod32cn.com
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þšiþ)í…æèw*\x1fjg¬±¨\x1e¶‰šŽŠÝ¢jÿ¾\a«þG«éÿ¢¸\f¢·¦j:+v‰¨ŠwèjØm¶Ÿÿþø\x1e¯ù\x1e®w¥þŠàþf£¢·hšâúÿ†Ù¥

  parent reply	other threads:[~2008-05-15 14:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-15  8:19 from which hook , I can get the usrname that pppd used? cyx_mail
2008-05-15 13:57 ` James Carlson
2008-05-15 14:53 ` cyx [this message]
2008-05-15 19:14 ` James Carlson
2008-05-16  0:43 ` cyx_mail

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200805152253262655367@fiberhome.com.cn \
    --to=cyx@fiberhome.com.cn \
    --cc=linux-ppp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox