From: Michael Shigorin <mike@osdn.org.ua>
To: hardware@lists.altlinux.org
Subject: Re: [Hardware] Canon LBP printers
Date: Mon, 22 May 2006 13:11:39 +0300
Message-ID: <20060522101139.GI3017@osdn.org.ua> (raw)
In-Reply-To: <e4rm8c$a6d$5@sea.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 715 bytes --]
On Mon, May 22, 2006 at 01:38:04PM +0700, Andrei Lomov wrote:
> >> Типа, бумага кончилась - принтера больше нет ....
> >> Бумагу вставил, и нужно его выключить и включить ...
> > У нас для такого есть педаль lprestart, довольно аккуратная
> > суидная обёртка к которой вывешена пользователям на стол.
> Можно подробней?
Так... пока суть да дело (завтра в командировку),
цепляю текущую версию. Работает, в менюшки не садится
(у нас своя фиксированная), на стол тоже забито в образе
и skel. Если приложите руку с целью облагораживания --
буду признателен, патчик по мотивам ответов ldv@ тоже тут.
--
---- WBR, Michael Shigorin <mike@altlinux.ru>
------ Linux.Kiev http://www.linux.kiev.ua/
[-- Attachment #1.2: lprestart-0.1-alt1.src.rpm --]
[-- Type: application/octet-stream, Size: 5041 bytes --]
[-- Attachment #1.3: lprestart-0.1_0.2.patch --]
[-- Type: text/plain, Size: 1071 bytes --]
diff -Naur lprestart-0.1/lprestart.c lprestart-0.2/lprestart.c
--- lprestart-0.1/lprestart.c 2006-04-05 15:02:14 +0300
+++ lprestart-0.2/lprestart.c 2006-05-22 13:02:43 +0300
@@ -22,6 +22,7 @@
#define COMMAND "/bin/sh"
#define SCRIPT "/usr/sbin/lprestart.sh"
#define TERM "dumb"
+#define HOME "/"
#define _GNU_SOURCE
@@ -44,16 +45,6 @@
if (geteuid())
error (EXIT_FAILURE, 0, "must be (suid) root");
- pw = getpwuid (uid);
- if (!pw)
- error (EXIT_FAILURE, errno, "getpwuid");
-
- if (!pw->pw_dir)
- error (EXIT_FAILURE, 0, "invalid home directory");
-
- if (chdir (pw->pw_dir) < 0)
- error (EXIT_FAILURE, errno, "chdir");
-
/* environ */
if (clearenv () < 0 )
error (EXIT_FAILURE, errno, "clearenv");
@@ -64,7 +55,7 @@
if (setenv ("LOGNAME", pw->pw_name, 1) < 0)
error (EXIT_FAILURE, errno, "setenv: LOGNAME");
- if (setenv ("HOME", pw->pw_dir, 1) < 0)
+ if (setenv ("HOME", HOME, 1) < 0)
error (EXIT_FAILURE, errno, "setenv: HOME");
if (setenv ("PATH", "/sbin:/usr/sbin:/bin:/usr/bin", 1) < 0)
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-05-22 10:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-21 14:58 Andrei Lomov
2006-05-21 15:06 ` Andrei Lomov
2006-05-21 16:07 ` Michael Shigorin
2006-05-21 16:27 ` Dmitriy L. Kruglikov
2006-05-21 17:40 ` Michael Shigorin
2006-05-22 6:38 ` Andrei Lomov
2006-05-22 10:02 ` Michael Shigorin
2006-05-22 10:11 ` Michael Shigorin [this message]
2006-05-22 6:34 ` Andrei Lomov
2006-05-22 6:55 ` Dmitriy L. Kruglikov
2006-05-22 6:46 ` Slava Dubrovskiy
2006-05-22 6:57 ` Dmitriy L. Kruglikov
2006-05-22 7:06 ` Slava Dubrovskiy
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=20060522101139.GI3017@osdn.org.ua \
--to=mike@osdn.org.ua \
--cc=hardware@altlinux.ru \
--cc=hardware@lists.altlinux.org \
--cc=shigorin@gmail.com \
/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
ALT Linux hardware support
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/hardware/0 hardware/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 hardware hardware/ http://lore.altlinux.org/hardware \
hardware@altlinux.ru hardware@lists.altlinux.org hardware@lists.altlinux.ru hardware@lists.altlinux.com hardware@altlinux.org
public-inbox-index hardware
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.hardware
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git