Skip to content

Commit

Permalink
Fix for Issue SUSE#5 (LOGNAME not set on exec with --user parameter)
Browse files Browse the repository at this point in the history
Also updated dates and some incorrect texts.
  • Loading branch information
tsariounov committed Jun 9, 2011
1 parent f17b178 commit ae24e7d
Show file tree
Hide file tree
Showing 21 changed files with 62 additions and 48 deletions.
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ For more information:
Prebuild Binary Packages
========================
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
11 changes: 11 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -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)
http://code.google.com/p/cpuset
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>

Expand Down
2 changes: 1 addition & 1 deletion cpuset.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# norootforbuild

Name: cpuset
Version: 1.5.5
Version: 1.5.6
Release: 1
License: GPL v2 only
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
5 changes: 4 additions & 1 deletion cpuset/commands/proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,10 @@ def run(tset, args, usr_par=None, grp_par=None):
s.path, os.getpid())
# change user and group before exec
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)

def is_unbound(proc):
Expand Down
2 changes: 1 addition & 1 deletion cpuset/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""

version = '1.5.5'
version = '1.5.6'
16 changes: 8 additions & 8 deletions cset.init.d
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ test -x $CSET_BIN || { echo "$CSET_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }

# cset variables
# cset variables (EDIT apropriately for your situation)
CSET_SYSTEM=0
CSET_USER=1-7

# Check for existence of needed config file and read it
# This is not used for this example, but you can create one for
# Check for existence of cset config file and read it
# This is not used in this example, but you can create one for
# your setup if you wish.
#CSET_CONFIG=/etc/sysconfig/cset
#test -r $CSET_CONFIG || { echo "$CSET_CONFIG not existing";
Expand Down Expand Up @@ -86,16 +86,16 @@ case "$1" in
#### 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
# everything and all other CPUs are assigned to the shield. This
# is a typical simple shielding setup. Adjust if your needs are
# different.
# everything and all other CPUs (assuming this is a 4-CPU system) are assigned
# to the shield. This is a typical simple shielding setup. Adjust if your
# needs are different.

# For shielding kernel threads as well, use the -k switch below instead
# 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
Expand Down
6 changes: 3 additions & 3 deletions doc/cset-proc.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: cset-proc
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 02/11/2010
.\" Date: 06/09/2011
.\" Manual: [FIXME: manual]
.\" Source: [FIXME: source]
.\" 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
.\" -----------------------------------------------------------------
Expand Down Expand Up @@ -258,7 +258,7 @@ You do not have to worry about where in the Linux filesystem the cpuset filesyst
.SH "LICENSE"
Cpuset is licensed under the GNU GPL V2 only\&.
.SH "COPYRIGHT"
Copyright (c) 2008\-2010 Novell Inc\&.
Copyright (c) 2008\-2011 Novell Inc\&.
.SH "AUTHOR"
Written by Alex Tsariounov <alext@novell\&.com>\&.
.SH "SEE ALSO"
Expand Down
6 changes: 3 additions & 3 deletions doc/cset-proc.html
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ <h2 id="_license">LICENSE</h2>
</div>
<h2 id="_copyright">COPYRIGHT</h2>
<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>
<h2 id="_author">AUTHOR</h2>
<div class="sectionbody">
Expand All @@ -700,8 +700,8 @@ <h2 id="_see_also">SEE ALSO</h2>
</div>
<div id="footer">
<div id="footer-text">
Version 1.5.3<br />
Last updated 2010-02-11 13:36:15 MDT
Version 1.5.6<br />
Last updated 2011-06-09 12:52:44 EDT
</div>
</div>
</body>
Expand Down
4 changes: 2 additions & 2 deletions doc/cset-proc.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cset-proc(1)
============
Alex Tsariounov <[email protected]>
v1.5.3, February 2010
v1.5.6, June 2011

NAME
----
Expand Down Expand Up @@ -207,7 +207,7 @@ Cpuset is licensed under the GNU GPL V2 only.

COPYRIGHT
---------
Copyright (c) 2008-2010 Novell Inc.
Copyright (c) 2008-2011 Novell Inc.

AUTHOR
------
Expand Down
6 changes: 3 additions & 3 deletions doc/cset-set.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: cset-set
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 02/11/2010
.\" Date: 06/09/2011
.\" Manual: [FIXME: manual]
.\" Source: [FIXME: source]
.\" 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
.\" -----------------------------------------------------------------
Expand Down Expand Up @@ -125,7 +125,7 @@ The above commands will create the new cpusets, or if they already exist, they w
.SH "LICENSE"
Cpuset is licensed under the GNU GPL V2 only\&.
.SH "COPYRIGHT"
Copyright (c) 2008\-2010 Novell Inc\&.
Copyright (c) 2008\-2011 Novell Inc\&.
.SH "AUTHOR"
Written by Alex Tsariounov <alext@novell\&.com>\&.
.SH "SEE ALSO"
Expand Down
6 changes: 3 additions & 3 deletions doc/cset-set.html
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ <h2 id="_license">LICENSE</h2>
</div>
<h2 id="_copyright">COPYRIGHT</h2>
<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>
<h2 id="_author">AUTHOR</h2>
<div class="sectionbody">
Expand All @@ -629,8 +629,8 @@ <h2 id="_see_also">SEE ALSO</h2>
</div>
<div id="footer">
<div id="footer-text">
Version 1.5.3<br />
Last updated 2010-02-11 13:36:30 MDT
Version 1.5.6<br />
Last updated 2011-06-09 12:53:27 EDT
</div>
</div>
</body>
Expand Down
4 changes: 2 additions & 2 deletions doc/cset-set.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cset-set(1)
===========
Alex Tsariounov <[email protected]>
v1.5.3, February 2010
v1.5.6, June 2011

NAME
----
Expand Down Expand Up @@ -156,7 +156,7 @@ Cpuset is licensed under the GNU GPL V2 only.

COPYRIGHT
---------
Copyright (c) 2008-2010 Novell Inc.
Copyright (c) 2008-2011 Novell Inc.

AUTHOR
------
Expand Down
6 changes: 3 additions & 3 deletions doc/cset-shield.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: cset-shield
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 02/11/2010
.\" Date: 06/09/2011
.\" Manual: [FIXME: manual]
.\" Source: [FIXME: source]
.\" 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
.\" -----------------------------------------------------------------
Expand Down Expand Up @@ -241,7 +241,7 @@ Even though you can mix general usage of cpusets with the shielding concepts des
.SH "LICENSE"
Cpuset is licensed under the GNU GPL V2 only\&.
.SH "COPYRIGHT"
Copyright (c) 2008\-2010 Novell Inc\&.
Copyright (c) 2008\-2011 Novell Inc\&.
.SH "AUTHOR"
Written by Alex Tsariounov <alext@novell\&.com>\&.
.SH "SEE ALSO"
Expand Down
6 changes: 3 additions & 3 deletions doc/cset-shield.html
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ <h2 id="_license">LICENSE</h2>
</div>
<h2 id="_copyright">COPYRIGHT</h2>
<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>
<h2 id="_author">AUTHOR</h2>
<div class="sectionbody">
Expand All @@ -721,8 +721,8 @@ <h2 id="_see_also">SEE ALSO</h2>
</div>
<div id="footer">
<div id="footer-text">
Version 1.5.3<br />
Last updated 2010-02-11 13:36:44 MDT
Version 1.5.6<br />
Last updated 2011-06-09 12:53:43 EDT
</div>
</div>
</body>
Expand Down
4 changes: 2 additions & 2 deletions doc/cset-shield.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cset-shield(1)
==============
Alex Tsariounov <[email protected]>
v1.5.3, February 2010
v1.5.6, June 2011

NAME
----
Expand Down Expand Up @@ -230,7 +230,7 @@ Cpuset is licensed under the GNU GPL V2 only.

COPYRIGHT
---------
Copyright (c) 2008-2010 Novell Inc.
Copyright (c) 2008-2011 Novell Inc.

AUTHOR
------
Expand Down
6 changes: 3 additions & 3 deletions doc/cset.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: cset
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 02/11/2010
.\" Date: 06/09/2011
.\" Manual: [FIXME: manual]
.\" Source: [FIXME: source]
.\" 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
.\" -----------------------------------------------------------------
Expand Down Expand Up @@ -135,7 +135,7 @@ Specify the mountpoint where the cpuset filesystem is to be mounted\&. By defaul
.SH "LICENSE"
Cpuset is licensed under the GNU GPL V2 only\&.
.SH "COPYRIGHT"
Copyright (c) 2008\-2010 Novell Inc\&.
Copyright (c) 2008\-2011 Novell Inc\&.
.SH "AUTHOR"
Written by Alex Tsariounov <alext@novell\&.com>

Expand Down
6 changes: 3 additions & 3 deletions doc/cset.html
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ <h2 id="_license">LICENSE</h2>
</div>
<h2 id="_copyright">COPYRIGHT</h2>
<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>
<h2 id="_author">AUTHOR</h2>
<div class="sectionbody">
Expand All @@ -653,8 +653,8 @@ <h2 id="_see_also">SEE ALSO</h2>
</div>
<div id="footer">
<div id="footer-text">
Version 1.5.3<br />
Last updated 2010-02-11 13:37:05 MDT
Version 1.5.6<br />
Last updated 2011-06-09 12:53:59 EDT
</div>
</div>
</body>
Expand Down
4 changes: 2 additions & 2 deletions doc/cset.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cset(1)
======
Alex Tsariounov <[email protected]>
v1.5.3, December 2010
v1.5.6, June 2011

NAME
----
Expand Down Expand Up @@ -139,7 +139,7 @@ Cpuset is licensed under the GNU GPL V2 only.

COPYRIGHT
---------
Copyright (c) 2008-2010 Novell Inc.
Copyright (c) 2008-2011 Novell Inc.

AUTHOR
------
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ <h1>Cpuset (cset) Tutorial</h1>
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p>Alex Tsariounov &lt;<a href="mailto:[email protected]">[email protected]</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
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
Expand Down Expand Up @@ -1802,7 +1802,7 @@ <h2 id="_what_to_do_if_there_are_problems">5. What To Do if There are Problems</
</div>
<div id="footer">
<div id="footer-text">
Last updated 2010-02-11 13:35:27 MDT
Last updated 2011-06-09 12:56:15 EDT
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Cpuset (cset) Tutorial
######################

Alex Tsariounov <[email protected]> +
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
worldwide, without royalty, in any medium, provided this notice is preserved.

Expand Down

0 comments on commit ae24e7d

Please sign in to comment.