Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0013519 | Openbravo ERP | A. Platform | public | 2010-06-04 11:07 | 2010-09-13 12:38 |
|
Reporter | iperdomo | |
Assigned To | jpabloae | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 20 | OS Version | 2.6.30-gentoo-r5 |
Product Version | 2.50MP18 | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0013519: The compilation tasks should fail if are executed as root |
Description | A common pitfall on new developers using the development framework is to compile as root because of the write permission restrictions. The OS user (developer), tomcat, etc.
The compilation should fail if the OS user is root. |
Steps To Reproduce | * Compile as root
* Restart the tomcat server
* Boom! |
Proposed Solution | * Append a check on the OS user in the init task (attached a patch) |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | build.xml.diff (644) 2010-06-04 11:07 https://issues.openbravo.com/file_download.php?file_id=2626&type=bug disallow-root.diff (1,224) 2010-07-21 18:42 https://issues.openbravo.com/file_download.php?file_id=2793&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2010-06-04 11:07 | iperdomo | New Issue | |
2010-06-04 11:07 | iperdomo | Assigned To | => jpabloae |
2010-06-04 11:07 | iperdomo | File Added: build.xml.diff | |
2010-06-04 11:56 | shuehner | Note Added: 0027944 | |
2010-06-04 11:56 | shuehner | Issue Monitored: shuehner | |
2010-06-04 14:09 | jpabloae | Status | new => acknowledged |
2010-07-13 10:35 | iperdomo | Note Added: 0029248 | |
2010-07-21 18:42 | jpabloae | Note Added: 0029451 | |
2010-07-21 18:42 | jpabloae | File Added: disallow-root.diff | |
2010-07-21 18:43 | jpabloae | Note Edited: 0029451 | bug_revision_view_page.php?bugnote_id=0029451#r608 |
2010-07-21 19:12 | iperdomo | Note Added: 0029454 | |
2010-07-27 16:41 | hgbot | Checkin | |
2010-07-27 16:41 | hgbot | Note Added: 0029612 | |
2010-07-27 16:41 | hgbot | Status | acknowledged => resolved |
2010-07-27 16:41 | hgbot | Resolution | open => fixed |
2010-07-27 16:41 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/3cbb2e1e1ce56dd850b4ebe27400a62f4cb91563 [^] |
2010-07-27 17:40 | hgbot | Checkin | |
2010-07-27 17:40 | hgbot | Note Added: 0029616 | |
2010-07-27 23:48 | hudsonbot | Checkin | |
2010-07-27 23:48 | hudsonbot | Note Added: 0029621 | |
2010-07-27 23:48 | hudsonbot | Checkin | |
2010-07-27 23:48 | hudsonbot | Note Added: 0029624 | |
2010-08-23 16:29 | iperdomo | Note Added: 0030230 | |
2010-08-23 16:29 | iperdomo | Status | resolved => closed |
2010-09-13 12:38 | anonymous | sf_bug_id | 0 => 3065151 |
Notes |
|
|
Not sure:
Might be legitimate usecase sometimes... which we now break. On the other hand avoids the pitfall..
But there are more pitfalls like wrong java version, env not setup etc.. which are only checked by diagnostics. |
|
|
|
Perhaps a property defaulted to not allow compilation as root, but can be override, e.g.
ant install.source -Dallow.root=true
ant compile.deploy -Dallow.root=true |
|
|
(0029451)
|
jpabloae
|
2010-07-21 18:42
(edited on: 2010-07-21 18:43) |
|
I agree with adding this as a check plus optionally allowing to override it. Either by adding allow.root=true into the config/Openbravo.properties or as an argument to the ant command.
I attach patch that implements this based on Ivan's.
If you don't see any inconveniences to this I'll push it to pi the following days.
|
|
|
|
I'm fine with the proposed changes
Cheers, |
|
|
(0029612)
|
hgbot
|
2010-07-27 16:41
|
|
Repository: erp/devel/pi
Changeset: 3cbb2e1e1ce56dd850b4ebe27400a62f4cb91563
Author: Juan Pablo Aroztegi <juanpablo.aroztegi <at> openbravo.com>
Date: Tue Jul 27 16:39:03 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3cbb2e1e1ce56dd850b4ebe27400a62f4cb91563 [^]
Fixes issue 13519: disallow running ant tasks as root
To override this check, two options:
1) Add the -Dallow.root=true argument to the ant command.
2) Add allow.root=true to the config/Openbravo.properties file
---
M build.xml
---
|
|
|
(0029616)
|
hgbot
|
2010-07-27 17:40
|
|
|
|
|
|
|
|
|
|
|
Tested on pi @ rev d1ae61b55653
This is the error message:
init:
BUILD FAILED
/home/iperdomo/src/openbravo/working/pi/build.xml:319: Don't run ant tasks with the root user
Total time: 12 seconds |
|