* util-linux patching
@ 2003-11-04 16:10 Dhruv Gami
2003-11-05 13:56 ` Stephen Smalley
0 siblings, 1 reply; 3+ messages in thread
From: Dhruv Gami @ 2003-11-04 16:10 UTC (permalink / raw)
To: SE Linux
[-- 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);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: util-linux patching
2003-11-05 13:56 ` Stephen Smalley
@ 2003-11-05 11:50 ` Dhruv Gami
0 siblings, 0 replies; 3+ messages in thread
From: Dhruv Gami @ 2003-11-05 11:50 UTC (permalink / raw)
To: Stephen Smalley, SE Linux
Stephen Smalley wrote:
>On Tue, 2003-11-04 at 11:10, Dhruv Gami wrote:
>
>
>>i downloaded the util-linux source, and applied the patch to it using
>>
>>patch -p1 < util-linux-selinux.patch
>>
>>
>
>See http://marc.theaimsgroup.com/?l=selinux&m=106553990121905&w=2
>
>
>
Thanks Stephen, and my apologies for not having the sense to look
through the mail archives for the answer before posting it onto the list.
regards,
Gami
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: util-linux patching
2003-11-04 16:10 util-linux patching Dhruv Gami
@ 2003-11-05 13:56 ` Stephen Smalley
2003-11-05 11:50 ` Dhruv Gami
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Smalley @ 2003-11-05 13:56 UTC (permalink / raw)
To: Dhruv Gami; +Cc: SE Linux
On Tue, 2003-11-04 at 11:10, Dhruv Gami wrote:
> i downloaded the util-linux source, and applied the patch to it using
>
> patch -p1 < util-linux-selinux.patch
See http://marc.theaimsgroup.com/?l=selinux&m=106553990121905&w=2
--
Stephen Smalley <sds@epoch.ncsc.mil>
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-11-05 17:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-04 16:10 util-linux patching Dhruv Gami
2003-11-05 13:56 ` Stephen Smalley
2003-11-05 11:50 ` Dhruv Gami
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.