From: Dhruv Gami <dgami@uncc.edu>
To: SE Linux <selinux@tycho.nsa.gov>
Subject: util-linux patching
Date: Tue, 04 Nov 2003 17:10:30 +0100 [thread overview]
Message-ID: <3FA7CF76.3080408@uncc.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]
hello everyone,
thanks for the quick and helpful responses regarding libattr. i managed
to get that up and running. now im stuck at another problem, and need
help with that.
i downloaded the util-linux source, and applied the patch to it using
patch -p1 < util-linux-selinux.patch
*******************
patching file login-utils/Makefile
patching file login-utils/login.c
Hunk #4 succeeded at 881 (offset -16 lines).
Hunk #5 succeeded at 1072 (offset -15 lines).
Hunk #6 succeeded at 1086 (offset -15 lines).
Hunk #7 succeeded at 1168 (offset -15 lines).
Hunk #8 FAILED at 1253.
Hunk #9 succeeded at 1285 (offset -28 lines).
1 out of 9 hunks FAILED -- saving rejects to file login-utils/login.c.rej
patching file login-utils/chfn.c
patching file login-utils/vipw.c
patching file login-utils/chsh.c
patching file login-utils/selinux_utils.h
patching file login-utils/selinux_utils.c
patching file MCONFIG
Hunk #1 succeeded at 18 with fuzz 2.
*******************
but the patch gives an error on login.c and creates a login.c.rej file
(i'm attaching it). I tried compiling inspite of this patch error, and
everything compiles fine without complaints, but the login program has
not been updated.
im trying to do this on a debian woody, for kernel selinux2.4.21. Im new
to patching, so i might be doing something wrong at a very basic level. :)
Thanks in advance,
regards,
Gami
[-- Attachment #2: login.c.rej --]
[-- Type: text/plain, Size: 868 bytes --]
***************
*** 1132,1137 ****
sigaction(SIGINT, &sa, NULL);
while(wait(NULL) == -1 && errno == EINTR) /**/ ;
openlog("login", LOG_ODELAY, LOG_AUTHPRIV);
PAM_END;
exit(0);
}
--- 1253,1272 ----
sigaction(SIGINT, &sa, NULL);
while(wait(NULL) == -1 && errno == EINTR) /**/ ;
openlog("login", LOG_ODELAY, LOG_AUTHPRIV);
+ #ifdef WITH_SELINUX
+ if (selinux_enabled)
+ {
+ /* We need to change the contexts of the terminal devices back to
+ the system when the user's session ends. */
+ security_restorelabel_tty(ttyn,ttyn_context);
+ #ifdef CHOWNVCS
+ if (consoletty(0)) {
+ security_restorelabel_tty(vcsn,vcsn_context);
+ security_restorelabel_tty(vcsan.vcsan_context);
+ }
+ #endif
+ }
+ #endif
PAM_END;
exit(0);
}
next reply other threads:[~2003-11-04 22:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-04 16:10 Dhruv Gami [this message]
2003-11-05 13:56 ` util-linux patching Stephen Smalley
2003-11-05 11:50 ` Dhruv Gami
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=3FA7CF76.3080408@uncc.edu \
--to=dgami@uncc.edu \
--cc=selinux@tycho.nsa.gov \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.