[PATCH] Fix compile error in realtime-lsm-source

Bug #70369 reported by Ross Vandegrift
4
Affects Status Importance Assigned to Milestone
realtime-lsm (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: realtime-lsm-source

Hello,

realtime-lsm hasn't been converted from MODULE_PARM to module_param. This patch takes care of that and restores its ability to be compiled.

--- realcap.c.orig 2004-05-10 19:54:16.000000000 -0400
+++ realcap.c 2006-11-04 23:45:49.000000000 -0500
@@ -33,19 +33,19 @@

 /* module parameters */
 static int any = 0; /* if TRUE, any process is realtime */
-MODULE_PARM(any, "i");
+module_param(any, int, 0444);
 MODULE_PARM_DESC(any, " grant realtime privileges to any process.");

 static int gid = -1; /* realtime group id, or NO_GROUP */
-MODULE_PARM(gid, "i");
+module_param(gid, int, 0444);
 MODULE_PARM_DESC(gid, " the group ID with access to realtime privileges.");

 static int mlock = 1; /* enable mlock() privileges */
-MODULE_PARM(mlock, "i");
+module_param(mlock, int, 0444);
 MODULE_PARM_DESC(mlock, " enable memory locking privileges.");

 static int allcaps = 0; /* enable all capabilities */
-MODULE_PARM(allcaps, "i");
+module_param(allcaps, int, 0444);
 MODULE_PARM_DESC(allcaps, " enable all capabilities, including CAP_SETPCAP.");

 static kernel_cap_t cap_bset_save; /* place to save cap-bound */

Revision history for this message
Ross Vandegrift (vandegrift) wrote :

Just noticed that the Ubuntu linux-kernel package for 2.6.17 in edgy already has this module, but that it's called realcap instead of realtime.

Also, it has a patch basically like mine, and like mine, it doesn't work. But that'll be a different bug report!

This can be ignored.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

The thing is that the 'capability' module has to be removed in order to 'realtime' or 'realcap' to load correctly. This is normally done by /etc/init.d/realtime from 'realtime-lsm' package. This may mess some users who try loading manually the modules the first time.

But the main problem is 'realtime-lsm-source' doesn't build and looks obsolete, but at the same time, the package 'realtime-lsm' still exists and tries to load 'realtime' and not 'realcap'. The package 'realtime-lsm' should be made virtual and try to install a new 'realcap' package, which would load the already present 'realcap' module.

This is quite simple indeed, but many users are confused for now. THis looks to me an important bug !

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.