summaryrefslogtreecommitdiff
path: root/Src/params.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/params.c')
-rw-r--r--Src/params.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/Src/params.c b/Src/params.c
index aa8b196bd..c64d7486b 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -1761,6 +1761,18 @@ getarg(char **str, int *inv, Value v, int a2, zlong *w,
return r;
}
+/*
+ * Parse a subscript.
+ *
+ * pptr: In/Out parameter. On entry, *ptr points to a "[foo]" string. On exit
+ * it will point one past the closing bracket.
+ *
+ * v: In/Out parameter. Its .start and .end members (at least) will be updated
+ * with the parsed indices.
+ *
+ * flags: can be either SCANPM_DQUOTED or zero. Other bits are not used.
+ */
+
/**/
int
getindex(char **pptr, Value v, int flags)
@@ -3245,7 +3257,11 @@ unsetparam(char *s)
unqueue_signals();
}
-/* Unset a parameter */
+/* Unset a parameter
+ *
+ * altflag: if true, don't remove pm->ename from the environment
+ * exp: See stdunsetfn()
+ */
/**/
mod_export int
@@ -4061,7 +4077,7 @@ uidsetfn(UNUSED(Param pm), zlong x)
{
#ifdef HAVE_SETUID
if (setuid((uid_t)x))
- zwarn("failed to change user ID: %e", errno);
+ zerr("failed to change user ID: %e", errno);
#endif
}
@@ -4082,7 +4098,7 @@ euidsetfn(UNUSED(Param pm), zlong x)
{
#ifdef HAVE_SETEUID
if (seteuid((uid_t)x))
- zwarn("failed to change effective user ID: %e", errno);
+ zerr("failed to change effective user ID: %e", errno);
#endif
}
@@ -4103,7 +4119,7 @@ gidsetfn(UNUSED(Param pm), zlong x)
{
#ifdef HAVE_SETUID
if (setgid((gid_t)x))
- zwarn("failed to change group ID: %e", errno);
+ zerr("failed to change group ID: %e", errno);
#endif
}
@@ -4124,7 +4140,7 @@ egidsetfn(UNUSED(Param pm), zlong x)
{
#ifdef HAVE_SETEUID
if (setegid((gid_t)x))
- zwarn("failed to change effective group ID: %e", errno);
+ zerr("failed to change effective group ID: %e", errno);
#endif
}