Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin J. Thompson
Tor
Commits
018c8c92
Commit
018c8c92
authored
18 years ago
by
Andrew Lewman
Browse files
Options
Downloads
Patches
Plain Diff
Fix a potential race condition on install of rpm with running Tor.
svn:r9673
parent
d6368fd0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tor.spec.in
+11
-6
11 additions, 6 deletions
tor.spec.in
with
11 additions
and
6 deletions
tor.spec.in
+
11
−
6
View file @
018c8c92
...
...
@@ -201,6 +201,7 @@ for high-stakes anonymity.
%__mkdir_p -m 700 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/%{name}
%__mkdir_p -m 755 ${RPM_BUILD_ROOT}%{_localstatedir}/run/%{name}
%__mkdir_p -m 755 ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}
%__mkdir_p -m 700 ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/%{name}
%clean
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
...
...
@@ -212,10 +213,10 @@ for high-stakes anonymity.
# If tor is already installed and running (whether installed by RPM
# or not), then kill it, but remember that it was running.
%__rm -f /tmp/${name}-was-running-%{version}-%{release}
%__rm -f
/%{_localstatedir}
/tmp/${name}-was-running-%{version}-%{release}
if [ -f %{_initrddir}/%{name} ] && /sbin/service %{name} status ; then
/sbin/service %{name} stop
touch /tmp/${name}-was-running-%{version}-%{release}
touch
/%{_localstatedir}
/tmp/${name}-was-running-%{version}-%{release}
fi
#
...
...
@@ -251,9 +252,9 @@ fi
# Make sure the runtime data have the right ownership.
%__chown -R %{toruser}.%{torgroup} %{_localstatedir}/{lib,log,run}/%{name}
if [ -f /tmp/${name}-was-running-%{version}-%{release} ]; then
if [ -f
/%{_localstatedir}
/tmp/${name}-was-running-%{version}-%{release} ]; then
/sbin/service %{name} start
%__rm -f /tmp/${name}-was-running-%{version}-%{release}
%__rm -f
/%{_localstatedir}
/tmp/${name}-was-running-%{version}-%{release}
fi
exit 0
...
...
@@ -296,13 +297,17 @@ exit 0
%changelog
* Fri May 26 2006 Andrew Lewman <phobos@interloper.org>
* Tue Feb 27 2007 Andrew Lewman <phobos@rootme.org>
- Fix a potential race condition in how we determine the running state of tor. Found by Stefan Nordhausen.
- see OR-CVS for details
* Fri May 26 2006 Andrew Lewman <phobos@rootme.org>
- Add in a few "SUSEisms" to make dist-rpm actually work on suse
- Turn Tor "on" via chkconfig
- Update -mcpu to -mtune to make GCC happy
- see OR-CVS for details
* Tue Mar 28 2006 Andrew Lewman <phobos@
interloper
.org>
* Tue Mar 28 2006 Andrew Lewman <phobos@
rootme
.org>
- converted to build the specified target cpu and arch
- override related rpm macros to build correctly
- see OR-CVS for details
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment