Fix for Issue #5 (LOGNAME not set on exec with --user parameter)

Also updated dates and some incorrect texts.
python3
Alex Tsariounov 13 years ago
parent f17b178714
commit ae24e7d34a

@ -26,6 +26,6 @@ For more information:
Prebuild Binary Packages Prebuild Binary Packages
======================== ========================
Alternatively, you may download pre-built binary packages for multiple Alternatively, you may download pre-built binary packages for multiple
distributions from the OpenSUSE Build Service here: distributions from the Open Build Service here:
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset http://download.opensuse.org/repositories/home:/tsariounov:/cpuset

11
NEWS

@ -1,3 +1,14 @@
============================================================
Cpuset 1.5.6 (June 9, 2011)
http://code.google.com/p/cpuset
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset/
Maintenance update to 1.5.5 includes fixes as follows.
* Fix for Issue#5: LOGNAME environment variable set incorrectly...
Set LOGNAME and USERNAME env variables when execing new process
to match --user option, if given.
============================================================ ============================================================
Cpuset 1.5.5 (August 3, 2010) Cpuset 1.5.5 (August 3, 2010)
http://code.google.com/p/cpuset http://code.google.com/p/cpuset

@ -15,7 +15,7 @@ Bugs or feature requests should be sent to:
----- -----
Copyright (C) 2008-2010 Novell Inc. Copyright (C) 2008-2011 Novell Inc.
Author: Alex Tsariounov <alext@novell.com> Author: Alex Tsariounov <alext@novell.com>

@ -16,7 +16,7 @@
# norootforbuild # norootforbuild
Name: cpuset Name: cpuset
Version: 1.5.5 Version: 1.5.6
Release: 1 Release: 1
License: GPL v2 only License: GPL v2 only
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build

@ -565,7 +565,10 @@ def run(tset, args, usr_par=None, grp_par=None):
s.path, os.getpid()) s.path, os.getpid())
# change user and group before exec # change user and group before exec
if grp_par: os.setgid(group) if grp_par: os.setgid(group)
if usr_par: os.setuid(user) if usr_par:
os.setuid(user)
os.environ["LOGNAME"] = usr_par
os.environ["USERNAME"] = usr_par
os.execvp(args[0], args) os.execvp(args[0], args)
def is_unbound(proc): def is_unbound(proc):

@ -16,4 +16,4 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
""" """
version = '1.5.5' version = '1.5.6'

@ -51,12 +51,12 @@ test -x $CSET_BIN || { echo "$CSET_BIN not installed";
if [ "$1" = "stop" ]; then exit 0; if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; } else exit 5; fi; }
# cset variables # cset variables (EDIT apropriately for your situation)
CSET_SYSTEM=0 CSET_SYSTEM=0
CSET_USER=1-7 CSET_USER=1-7
# Check for existence of needed config file and read it # Check for existence of cset config file and read it
# This is not used for this example, but you can create one for # This is not used in this example, but you can create one for
# your setup if you wish. # your setup if you wish.
#CSET_CONFIG=/etc/sysconfig/cset #CSET_CONFIG=/etc/sysconfig/cset
#test -r $CSET_CONFIG || { echo "$CSET_CONFIG not existing"; #test -r $CSET_CONFIG || { echo "$CSET_CONFIG not existing";
@ -86,16 +86,16 @@ case "$1" in
#### Example 1: using the shield subcommand #### Example 1: using the shield subcommand
## ##
#$CSET_BIN shield --cpu=0 #$CSET_BIN shield --cpu=1-3
# Note that this creates CPU 0 as the general processor that runs # Note that this creates CPU 0 as the general processor that runs
# everything and all other CPUs are assigned to the shield. This # everything and all other CPUs (assuming this is a 4-CPU system) are assigned
# is a typical simple shielding setup. Adjust if your needs are # to the shield. This is a typical simple shielding setup. Adjust if your
# different. # needs are different.
# For shielding kernel threads as well, use the -k switch below instead # For shielding kernel threads as well, use the -k switch below instead
# of the shield command above. # of the shield command above.
#$CSET_BIN shield --cpu=0 -k #$CSET_BIN shield --cpu=1-3 -k
## ##
#### Example 2: using the set and proc subcommands #### Example 2: using the set and proc subcommands

@ -2,12 +2,12 @@
.\" Title: cset-proc .\" Title: cset-proc
.\" Author: [see the "AUTHOR" section] .\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 02/11/2010 .\" Date: 06/09/2011
.\" Manual: [FIXME: manual] .\" Manual: [FIXME: manual]
.\" Source: [FIXME: source] .\" Source: [FIXME: source]
.\" Language: English .\" Language: English
.\" .\"
.TH "CSET\-PROC" "1" "02/11/2010" "[FIXME: source]" "[FIXME: manual]" .TH "CSET\-PROC" "1" "06/09/2011" "[FIXME: source]" "[FIXME: manual]"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
@ -258,7 +258,7 @@ You do not have to worry about where in the Linux filesystem the cpuset filesyst
.SH "LICENSE" .SH "LICENSE"
Cpuset is licensed under the GNU GPL V2 only\&. Cpuset is licensed under the GNU GPL V2 only\&.
.SH "COPYRIGHT" .SH "COPYRIGHT"
Copyright (c) 2008\-2010 Novell Inc\&. Copyright (c) 2008\-2011 Novell Inc\&.
.SH "AUTHOR" .SH "AUTHOR"
Written by Alex Tsariounov <alext@novell\&.com>\&. Written by Alex Tsariounov <alext@novell\&.com>\&.
.SH "SEE ALSO" .SH "SEE ALSO"

@ -685,7 +685,7 @@ respect to the root of the cpuset filesystem.</p></div>
</div> </div>
<h2 id="_copyright">COPYRIGHT</h2> <h2 id="_copyright">COPYRIGHT</h2>
<div class="sectionbody"> <div class="sectionbody">
<div class="paragraph"><p>Copyright (c) 2008-2010 Novell Inc.</p></div> <div class="paragraph"><p>Copyright (c) 2008-2011 Novell Inc.</p></div>
</div> </div>
<h2 id="_author">AUTHOR</h2> <h2 id="_author">AUTHOR</h2>
<div class="sectionbody"> <div class="sectionbody">
@ -700,8 +700,8 @@ respect to the root of the cpuset filesystem.</p></div>
</div> </div>
<div id="footer"> <div id="footer">
<div id="footer-text"> <div id="footer-text">
Version 1.5.3<br /> Version 1.5.6<br />
Last updated 2010-02-11 13:36:15 MDT Last updated 2011-06-09 12:52:44 EDT
</div> </div>
</div> </div>
</body> </body>

@ -1,7 +1,7 @@
cset-proc(1) cset-proc(1)
============ ============
Alex Tsariounov <alext@novell.com> Alex Tsariounov <alext@novell.com>
v1.5.3, February 2010 v1.5.6, June 2011
NAME NAME
---- ----
@ -207,7 +207,7 @@ Cpuset is licensed under the GNU GPL V2 only.
COPYRIGHT COPYRIGHT
--------- ---------
Copyright (c) 2008-2010 Novell Inc. Copyright (c) 2008-2011 Novell Inc.
AUTHOR AUTHOR
------ ------

@ -2,12 +2,12 @@
.\" Title: cset-set .\" Title: cset-set
.\" Author: [see the "AUTHOR" section] .\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 02/11/2010 .\" Date: 06/09/2011
.\" Manual: [FIXME: manual] .\" Manual: [FIXME: manual]
.\" Source: [FIXME: source] .\" Source: [FIXME: source]
.\" Language: English .\" Language: English
.\" .\"
.TH "CSET\-SET" "1" "02/11/2010" "[FIXME: source]" "[FIXME: manual]" .TH "CSET\-SET" "1" "06/09/2011" "[FIXME: source]" "[FIXME: manual]"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
@ -125,7 +125,7 @@ The above commands will create the new cpusets, or if they already exist, they w
.SH "LICENSE" .SH "LICENSE"
Cpuset is licensed under the GNU GPL V2 only\&. Cpuset is licensed under the GNU GPL V2 only\&.
.SH "COPYRIGHT" .SH "COPYRIGHT"
Copyright (c) 2008\-2010 Novell Inc\&. Copyright (c) 2008\-2011 Novell Inc\&.
.SH "AUTHOR" .SH "AUTHOR"
Written by Alex Tsariounov <alext@novell\&.com>\&. Written by Alex Tsariounov <alext@novell\&.com>\&.
.SH "SEE ALSO" .SH "SEE ALSO"

@ -614,7 +614,7 @@ already exist, they will modify them to the new specifications.</p></div>
</div> </div>
<h2 id="_copyright">COPYRIGHT</h2> <h2 id="_copyright">COPYRIGHT</h2>
<div class="sectionbody"> <div class="sectionbody">
<div class="paragraph"><p>Copyright (c) 2008-2010 Novell Inc.</p></div> <div class="paragraph"><p>Copyright (c) 2008-2011 Novell Inc.</p></div>
</div> </div>
<h2 id="_author">AUTHOR</h2> <h2 id="_author">AUTHOR</h2>
<div class="sectionbody"> <div class="sectionbody">
@ -629,8 +629,8 @@ already exist, they will modify them to the new specifications.</p></div>
</div> </div>
<div id="footer"> <div id="footer">
<div id="footer-text"> <div id="footer-text">
Version 1.5.3<br /> Version 1.5.6<br />
Last updated 2010-02-11 13:36:30 MDT Last updated 2011-06-09 12:53:27 EDT
</div> </div>
</div> </div>
</body> </body>

@ -1,7 +1,7 @@
cset-set(1) cset-set(1)
=========== ===========
Alex Tsariounov <alext@novell.com> Alex Tsariounov <alext@novell.com>
v1.5.3, February 2010 v1.5.6, June 2011
NAME NAME
---- ----
@ -156,7 +156,7 @@ Cpuset is licensed under the GNU GPL V2 only.
COPYRIGHT COPYRIGHT
--------- ---------
Copyright (c) 2008-2010 Novell Inc. Copyright (c) 2008-2011 Novell Inc.
AUTHOR AUTHOR
------ ------

@ -2,12 +2,12 @@
.\" Title: cset-shield .\" Title: cset-shield
.\" Author: [see the "AUTHOR" section] .\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 02/11/2010 .\" Date: 06/09/2011
.\" Manual: [FIXME: manual] .\" Manual: [FIXME: manual]
.\" Source: [FIXME: source] .\" Source: [FIXME: source]
.\" Language: English .\" Language: English
.\" .\"
.TH "CSET\-SHIELD" "1" "02/11/2010" "[FIXME: source]" "[FIXME: manual]" .TH "CSET\-SHIELD" "1" "06/09/2011" "[FIXME: source]" "[FIXME: manual]"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
@ -241,7 +241,7 @@ Even though you can mix general usage of cpusets with the shielding concepts des
.SH "LICENSE" .SH "LICENSE"
Cpuset is licensed under the GNU GPL V2 only\&. Cpuset is licensed under the GNU GPL V2 only\&.
.SH "COPYRIGHT" .SH "COPYRIGHT"
Copyright (c) 2008\-2010 Novell Inc\&. Copyright (c) 2008\-2011 Novell Inc\&.
.SH "AUTHOR" .SH "AUTHOR"
Written by Alex Tsariounov <alext@novell\&.com>\&. Written by Alex Tsariounov <alext@novell\&.com>\&.
.SH "SEE ALSO" .SH "SEE ALSO"

@ -706,7 +706,7 @@ and proc) directly.</td>
</div> </div>
<h2 id="_copyright">COPYRIGHT</h2> <h2 id="_copyright">COPYRIGHT</h2>
<div class="sectionbody"> <div class="sectionbody">
<div class="paragraph"><p>Copyright (c) 2008-2010 Novell Inc.</p></div> <div class="paragraph"><p>Copyright (c) 2008-2011 Novell Inc.</p></div>
</div> </div>
<h2 id="_author">AUTHOR</h2> <h2 id="_author">AUTHOR</h2>
<div class="sectionbody"> <div class="sectionbody">
@ -721,8 +721,8 @@ and proc) directly.</td>
</div> </div>
<div id="footer"> <div id="footer">
<div id="footer-text"> <div id="footer-text">
Version 1.5.3<br /> Version 1.5.6<br />
Last updated 2010-02-11 13:36:44 MDT Last updated 2011-06-09 12:53:43 EDT
</div> </div>
</div> </div>
</body> </body>

@ -1,7 +1,7 @@
cset-shield(1) cset-shield(1)
============== ==============
Alex Tsariounov <alext@novell.com> Alex Tsariounov <alext@novell.com>
v1.5.3, February 2010 v1.5.6, June 2011
NAME NAME
---- ----
@ -230,7 +230,7 @@ Cpuset is licensed under the GNU GPL V2 only.
COPYRIGHT COPYRIGHT
--------- ---------
Copyright (c) 2008-2010 Novell Inc. Copyright (c) 2008-2011 Novell Inc.
AUTHOR AUTHOR
------ ------

@ -2,12 +2,12 @@
.\" Title: cset .\" Title: cset
.\" Author: [see the "AUTHOR" section] .\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 02/11/2010 .\" Date: 06/09/2011
.\" Manual: [FIXME: manual] .\" Manual: [FIXME: manual]
.\" Source: [FIXME: source] .\" Source: [FIXME: source]
.\" Language: English .\" Language: English
.\" .\"
.TH "CSET" "1" "02/11/2010" "[FIXME: source]" "[FIXME: manual]" .TH "CSET" "1" "06/09/2011" "[FIXME: source]" "[FIXME: manual]"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * set default formatting .\" * set default formatting
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
@ -135,7 +135,7 @@ Specify the mountpoint where the cpuset filesystem is to be mounted\&. By defaul
.SH "LICENSE" .SH "LICENSE"
Cpuset is licensed under the GNU GPL V2 only\&. Cpuset is licensed under the GNU GPL V2 only\&.
.SH "COPYRIGHT" .SH "COPYRIGHT"
Copyright (c) 2008\-2010 Novell Inc\&. Copyright (c) 2008\-2011 Novell Inc\&.
.SH "AUTHOR" .SH "AUTHOR"
Written by Alex Tsariounov <alext@novell\&.com> Written by Alex Tsariounov <alext@novell\&.com>

@ -634,7 +634,7 @@ mountpoint = &lt;directory_name&gt;
</div> </div>
<h2 id="_copyright">COPYRIGHT</h2> <h2 id="_copyright">COPYRIGHT</h2>
<div class="sectionbody"> <div class="sectionbody">
<div class="paragraph"><p>Copyright (c) 2008-2010 Novell Inc.</p></div> <div class="paragraph"><p>Copyright (c) 2008-2011 Novell Inc.</p></div>
</div> </div>
<h2 id="_author">AUTHOR</h2> <h2 id="_author">AUTHOR</h2>
<div class="sectionbody"> <div class="sectionbody">
@ -653,8 +653,8 @@ http://www.procode.org/stgit). Stacked GIT is under GPL V2 or later.</p></div>
</div> </div>
<div id="footer"> <div id="footer">
<div id="footer-text"> <div id="footer-text">
Version 1.5.3<br /> Version 1.5.6<br />
Last updated 2010-02-11 13:37:05 MDT Last updated 2011-06-09 12:53:59 EDT
</div> </div>
</div> </div>
</body> </body>

@ -1,7 +1,7 @@
cset(1) cset(1)
====== ======
Alex Tsariounov <alext@novell.com> Alex Tsariounov <alext@novell.com>
v1.5.3, December 2010 v1.5.6, June 2011
NAME NAME
---- ----
@ -139,7 +139,7 @@ Cpuset is licensed under the GNU GPL V2 only.
COPYRIGHT COPYRIGHT
--------- ---------
Copyright (c) 2008-2010 Novell Inc. Copyright (c) 2008-2011 Novell Inc.
AUTHOR AUTHOR
------ ------

@ -467,7 +467,7 @@ function generateToc(toclevels) {
<div id="preamble"> <div id="preamble">
<div class="sectionbody"> <div class="sectionbody">
<div class="paragraph"><p>Alex Tsariounov &lt;<a href="mailto:alext@novell.com">alext@novell.com</a>&gt;<br /> <div class="paragraph"><p>Alex Tsariounov &lt;<a href="mailto:alext@novell.com">alext@novell.com</a>&gt;<br />
Copyright (c) 2009-2010 Novell Inc., cset v1.5.3<br /> Copyright (c) 2009-2011 Novell Inc., cset v1.5.6<br />
Verbatim copying and distribution of this entire article are permitted Verbatim copying and distribution of this entire article are permitted
worldwide, without royalty, in any medium, provided this notice is preserved.</p></div> worldwide, without royalty, in any medium, provided this notice is preserved.</p></div>
<div class="paragraph"><p>This tutorial describes basic and advanced usage of the <strong>cset</strong> command to <div class="paragraph"><p>This tutorial describes basic and advanced usage of the <strong>cset</strong> command to
@ -1802,7 +1802,7 @@ Please attach this file to the bug.</p></div>
</div> </div>
<div id="footer"> <div id="footer">
<div id="footer-text"> <div id="footer-text">
Last updated 2010-02-11 13:35:27 MDT Last updated 2011-06-09 12:56:15 EDT
</div> </div>
</div> </div>
</body> </body>

@ -2,7 +2,7 @@ Cpuset (cset) Tutorial
###################### ######################
Alex Tsariounov <alext@novell.com> + Alex Tsariounov <alext@novell.com> +
Copyright (c) 2009-2010 Novell Inc., cset v1.5.3 + Copyright (c) 2009-2011 Novell Inc., cset v1.5.6 +
Verbatim copying and distribution of this entire article are permitted Verbatim copying and distribution of this entire article are permitted
worldwide, without royalty, in any medium, provided this notice is preserved. worldwide, without royalty, in any medium, provided this notice is preserved.

Loading…
Cancel
Save