Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: 'UID=42 whoami' proceeds despite error
- X-seq: zsh-workers 40068
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: PATCH: 'UID=42 whoami' proceeds despite error
- Date: Fri, 2 Dec 2016 14:24:10 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=brasslantern-com.20150623.gappssmtp.com; s=20150623;        h=from:message-id:date:in-reply-to:comments:references:to:subject         :mime-version;        bh=Em2Rkj7YpOyCpdBTDQUWhLvEdmIizsK667Y2qcjmnjA=;        b=J/6/Tbz9H4cZm+LUfm2s48zn8aTrwk7oMUSyuDLxLa8aDxqDzUD7t95nkM9GhCggml         FKm9LqKXiLqNryDZ8ozK19k/GkUV3XFglE/QbCo3Kd+GEfc1IVFrHjRZmBBE1ryLtHey         dETpXhkHszNOHTuW3XEMOwRY+ibuvLkPmu1CDk1aFYjZ18E6jpiu4OyQgCu/7Ys09Edk         Di1QF6oQwzrBBRWW67qL05APlJpwP0U5qXSNW5IbbY6VMBQEfrLrD5J5d1m6366Skavi         +z/s1kYqoWIjpsavPzc7uqOZC6b4q6+DDrM3PSiv1/YxwsT2Ww7UJTIhf3yrcosViveZ         OOoA==
- In-reply-to: <20161202120826.GA8535@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20161202120826.GA8535@fujitsu.shahaf.local2>
On Dec 2, 12:08pm, Daniel Shahaf wrote:
}
} +    if (setuid((uid_t)x)) {
}  	zwarn("failed to change user ID: %e", errno);
} +	errflag |= ERRFLAG_ERROR;
} +    }
This is the wrong way to do this.  Just call zerr() instead of zwarn().
Messages sorted by:
Reverse Date,
Date,
Thread,
Author