"P. Alejandro Lopez-Valencia-Asesor" <palopez@colciencias.gov.co> writes:
| > I recompiled the Makefile the folowing POSIX-compliant settings for an IRIX
| > system:
[...]
| > Now I get this compiling error using gcc and cc:
| > wrapper.c: In function `main':
| > wrapper.c:100: warning: initialization makes integer from pointer without a
| > cast
This error is unrelated to the setting, except that it's in a part of the
code only compiled for POSIX.
This line:
char setgroups_used = "setgroups_was_included"; /* give strings a hint */
needs an asterisk or some brackets:
char setgroups_used[] = "setgroups_was_included"; /* give strings a hint */
Indeed, those three lines are slightly skew:
if (geteuid() == 0) { /* Should I exit if this test fails? */
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- YES!
char setgroups_used = "setgroups_was_included"; /* give strings a hint */
^-- need [] here
int groups[] = { POSIX_GID, 0 };
^^^-- get rid of the zero
you _only_ want POSIX_GID
Cheers,
- Cameron Simpson
cameron@research.canon.com.au, DoD#743
http://www.dap.csiro.au/~cameron/
--
BROCCOLI!! THE ONLY VEGETABLE THAT SOUNDS LIKE AN ADVERB!!
- ken@aiai.ed.ac.uk (Ken Johnson)
|
|