I was trying to use setuid and I kept getting a userid of 60001. Looking
at the code I found the reason.
uid = 60001;
if (argc > 1) {
Tcl_GetInt(interp, argv[1], &uid); /* new user id */
}
if (setuid((uid_t)uid) < 0) {
Tcl_AppendResult(interp, "setuid: ", Tcl_PosixError(interp),
NULL);
return TCL_ERROR;
}
return TCL_OK;
this works a lot better as
uid = 60001;
if (argc > 1) {
Tcl_GetInt(interp, argv[1], &uid); /* new user id */
if (setuid((uid_t)uid) < 0) {
Tcl_AppendResult(interp, "setuid: ", Tcl_PosixError(interp),
NULL);
return TCL_ERROR;
}
}
return TCL_OK;
--
Orion Robillard <[EMAIL PROTECTED]>
Smith & Wesson: The original point-and-click interface.