From: xlp <xlp@emtel.net.co>
To: linux-c-programming@vger.kernel.org
Subject: New project
Date: Fri, 26 Jul 2002 06:41:56 -0500 [thread overview]
Message-ID: <20020726064156.C365@nietzsche.metrotel.net.co> (raw)
Hi, I am coding a new project that demands me advanced C programming, I am bored
of "Learn how to program in C" and those basic C tasks.
I decided to make my own projects, understand manual pages style, learn how
to make sucessfull web search, use irc channel and so on...
I am coding a project, that It's a like a telnetd with login features, it
becomes a daemon, listens on certain port, accepts connection, autenticate, and
execute a shell.
The problem is when authentication is successful, It execve() a /bin/sh
however, I want to define certain variable such as PATH, TERM, etc.
I want that when a client 'logs in', my daemon set certain variables (ej.
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin) and then
executes the shell, so the client has a presetted variables on his session.
You may think, Why dont you read his .cshrc ?, I dont want to read any file
on the system , I just want my daemon set everything and then executes the
shell.
smthg like:
char *PATH="/bin:/sbin:/usr/bin:/usr/sbin";
char *TERM="vt100";
char *FOO="bar";
I read putenv() man, Does it have any relation?, I dont know who to put it
to work...
Thank you for any advice/help
bye.
next reply other threads:[~2002-07-26 11:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-26 11:41 xlp [this message]
2002-07-26 14:14 ` New project Bruno. N. F. Pacheco
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=20020726064156.C365@nietzsche.metrotel.net.co \
--to=xlp@emtel.net.co \
--cc=linux-c-programming@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;
as well as URLs for NNTP newsgroup(s).