util-linux patching
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
***************
*** 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);
}Quoted 3 lines · Dhruv Gami
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
Signature · 8 lines
Stephen Smalley <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 13 lines · Stephen Smalley
Quoted 5 lines · Dhruv Gami
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 [email protected] with the words "unsubscribe selinux" without quotes as the message.