Executing setuid(geteuid()) to fix SUID. At the moment SUID does
not work. Submitted by: Ari Suutari <ari.suutari@syncrontech.com> See: http://www.geocrawler.com/mail/msg.php3?msg_id=9029840&list=162
This commit is contained in:
parent
97f02f513a
commit
a23e6ab5b9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=65167
3 changed files with 12 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Daemon control program.
|
||||
*
|
||||
* $FreeBSD: /tmp/pcvs/ports/www/jakarta-tomcat4/files/Attic/daemonctl.c,v 1.7 2002-08-28 09:22:01 znerd Exp $
|
||||
* $FreeBSD: /tmp/pcvs/ports/www/jakarta-tomcat4/files/Attic/daemonctl.c,v 1.8 2002-08-28 09:29:59 znerd Exp $
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -78,6 +78,9 @@ int main(int argc, char *argv[]) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Set the UID to the effective UID to fix SUID */
|
||||
setuid(geteuid());
|
||||
|
||||
argument = argv[1];
|
||||
if (strcmp("start", argument) == 0) {
|
||||
start();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Daemon control program.
|
||||
*
|
||||
* $FreeBSD: /tmp/pcvs/ports/www/jakarta-tomcat41/files/Attic/daemonctl.c,v 1.7 2002-08-28 09:22:01 znerd Exp $
|
||||
* $FreeBSD: /tmp/pcvs/ports/www/jakarta-tomcat41/files/Attic/daemonctl.c,v 1.8 2002-08-28 09:29:59 znerd Exp $
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -78,6 +78,9 @@ int main(int argc, char *argv[]) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Set the UID to the effective UID to fix SUID */
|
||||
setuid(geteuid());
|
||||
|
||||
argument = argv[1];
|
||||
if (strcmp("start", argument) == 0) {
|
||||
start();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Daemon control program.
|
||||
*
|
||||
* $FreeBSD: /tmp/pcvs/ports/www/tomcat41/files/Attic/daemonctl.c,v 1.7 2002-08-28 09:22:01 znerd Exp $
|
||||
* $FreeBSD: /tmp/pcvs/ports/www/tomcat41/files/Attic/daemonctl.c,v 1.8 2002-08-28 09:29:59 znerd Exp $
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -78,6 +78,9 @@ int main(int argc, char *argv[]) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Set the UID to the effective UID to fix SUID */
|
||||
setuid(geteuid());
|
||||
|
||||
argument = argv[1];
|
||||
if (strcmp("start", argument) == 0) {
|
||||
start();
|
||||
|
|
Loading…
Reference in a new issue