| Author |
Message |
< Erlang ~ Running a unix command in an erlang program |
| developer |
Posted: Fri Aug 13, 2010 10:41 am |
|
|
|
Joined: 03 Mar 2010
Posts: 6
|
Hi
Is there a way to run a command with root privileges in an Erlang program.. I know that os:cmd can run a unix command. But what if the command requires root privileges?
Thanks in advance
Developer |
|
|
| Back to top |
|
| zajda |
Posted: Sat Aug 14, 2010 9:14 am |
|
|
|
User
Joined: 22 Aug 2009
Posts: 83
|
|
| Back to top |
|
| wojtnar |
Posted: Wed Sep 01, 2010 9:54 am |
|
|
|
Joined: 05 Feb 2010
Posts: 7
|
| Why don't you use good old setuid root? |
|
|
| Back to top |
|
| zajda |
Posted: Wed Sep 01, 2010 4:11 pm |
|
|
|
User
Joined: 22 Aug 2009
Posts: 83
|
| this is what NIF is supposed to do;) |
|
|
| Back to top |
|
| wojtnar |
Posted: Thu Sep 02, 2010 2:25 pm |
|
|
|
Joined: 05 Feb 2010
Posts: 7
|
I didn't know about setcap. If available, is the way to go.
NIF won't let you escalate privs if already not root. Fortunately. |
|
|
| Back to top |
|
| zajda |
Posted: Sat Sep 11, 2010 10:31 pm |
|
|
|
User
Joined: 22 Aug 2009
Posts: 83
|
|
| Back to top |
|
| wojtnar |
Posted: Tue Sep 14, 2010 9:23 pm |
|
|
|
Joined: 05 Feb 2010
Posts: 7
|
"Privilege escalation" is using a "defect" (so-called "bug") to gain more privileges, than a given process should have. |
|
|
| Back to top |
|
| zajda |
Posted: Wed Sep 15, 2010 10:48 am |
|
|
|
User
Joined: 22 Aug 2009
Posts: 83
|
| excuse my English then. I guess everyone reading this thread is aware, that we talk about controlled and secure way to run commands with root privileges. |
|
|
| Back to top |
|
| jwatte |
Posted: Fri Sep 24, 2010 6:02 pm |
|
|
|
User
Joined: 10 Feb 2010
Posts: 34
|
zajda wrote: excuse my English then. I guess everyone reading this thread is aware, that we talk about controlled and secure way to run commands with root privileges.
The way that's done in UNIX is that your main process runs as root as well. There's no way to escalate your privilege (a la "sudo") programatically. The main other way of getting root for a sub-command is to mark the sub-command as setuid.
So far, I don't understand what your question has to do with Erlang in specific. How would you solve the same problem in C? |
|
|
| Back to top |
|
| wuji |
Posted: Sat Aug 11, 2012 2:21 am |
|
|
|
User
Joined: 10 Aug 2012
Posts: 654
|
than half a century, and a football team's worth of of Cheap Ralph Lauren Shirts of children and grandchildren."He died as he lived. He
hard until the end, stayed positive, thought only of others others replica Christian Louboutin others and constantly reminded everyone of how blessed his life
been. His ambitions were far reaching, but he never never discount designer *beep* never believed he had to leave this Happy Valley to
them. He was a man devoted to his family, family, [h4]designer replica *beep*[/h4] family, his university, his players and his community," Paterno's family
in a statement.While at Penn State's helm, Paterno, who was was [h2]replica designer bags for sale[/h2] was born in Brooklyn, N.Y., led the Nittany Lions to
undefeated seasons and two NCAA championships, had only five losing losing cheap Ralph Lauren Polo losing seasons, was inducted into the College Football Hall of |
|
|
| Back to top |
|
| ysshoes |
Posted: Sat Aug 11, 2012 2:25 am |
|
|
|
Joined: 11 Aug 2012
Posts: 1
|
|
| Back to top |
|
| dongdongwu |
Posted: Thu Sep 20, 2012 5:34 am |
|
|
|
User
Joined: 19 Sep 2012
Posts: 236
|
His good friend Diane said: "Christian Louboutin Men Shoes was a magician, he make shoes is immediately put his female people with legs and advantage. He understands women wanted to do and can make them into beautiful Cinderella." Madonna often in its concert wearing Christian louboutin high heels , and some famous superstar like Angelina jolie, mariah Carey, beyonce Knowles, the famous Japanese singer YaYouMei Hamasaki helps Christian Louboutin Men Shoes set up its powerful position. The youngest customers will count Tom cruise's daughter sully cruz. Louboutin made for only a pair of handmade Christian Louboutin high heel Shoes! Want to be more fashion? Put on Christian Louboutin Outlet !
Candy colors of the chalaza high-heeled shoes with lolita type allure, set full finely gem blue "neon shoes" is to need to use "sexy" to describe. Each pair are worth careful appreciation of lithe and graceful fairy ludaoli, what kind of most let you move?Christian Louboutin Men Shoes that one brush red is always cannot resist the temptation, Christian Louboutin men outlet continue to use the days of high 8cm above slender heel proclaim the sexy and luxuriant. The bowknot on black pointed high-heeled shoes with sharp rivet concomitant, wild python met enchanting color printing grain, It is that pairs of high-heeled shoes lets Carrie more feminine flavour. Like Christian Louboutin for men her word. |
|
|
| Back to top |
|
|
|