mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-04 16:25:25 +00:00
Make user_cwd const since it is either a string literal or passed
in from the front-end.
This commit is contained in:
@@ -158,7 +158,7 @@ static struct path_escape io_path_escapes[] = {
|
|||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
expand_iolog_path(const char *prefix, const char *dir, const char *file,
|
expand_iolog_path(const char *prefix, const char *dir, const char *file,
|
||||||
char **slashp)
|
char const **slashp)
|
||||||
{
|
{
|
||||||
size_t len, prelen = 0;
|
size_t len, prelen = 0;
|
||||||
char *dst, *dst0, *path, *pathend, tmpbuf[PATH_MAX];
|
char *dst, *dst0, *path, *pathend, tmpbuf[PATH_MAX];
|
||||||
|
@@ -742,7 +742,8 @@ new_logline(const char *message, int serrno)
|
|||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
char *errstr = NULL;
|
char *errstr = NULL;
|
||||||
char *evstr = NULL;
|
char *evstr = NULL;
|
||||||
char *line, sessid[7], *tsid = NULL;
|
char *line, sessid[7];
|
||||||
|
const char *tsid = NULL;
|
||||||
debug_decl(new_logline, SUDO_DEBUG_LOGGING)
|
debug_decl(new_logline, SUDO_DEBUG_LOGGING)
|
||||||
|
|
||||||
/* A TSID may be a sudoers-style session ID or a free-form string. */
|
/* A TSID may be a sudoers-style session ID or a free-form string. */
|
||||||
|
@@ -85,8 +85,8 @@ struct sudo_user {
|
|||||||
char *privs;
|
char *privs;
|
||||||
char *limitprivs;
|
char *limitprivs;
|
||||||
#endif
|
#endif
|
||||||
char *cwd;
|
const char *cwd;
|
||||||
char *iolog_file;
|
const char *iolog_file;
|
||||||
GETGROUPS_T *gids;
|
GETGROUPS_T *gids;
|
||||||
int ngids;
|
int ngids;
|
||||||
int closefrom;
|
int closefrom;
|
||||||
@@ -323,7 +323,7 @@ void io_nextid(char *iolog_dir, char *iolog_dir_fallback, char sessid[7]);
|
|||||||
|
|
||||||
/* iolog_path.c */
|
/* iolog_path.c */
|
||||||
char *expand_iolog_path(const char *prefix, const char *dir, const char *file,
|
char *expand_iolog_path(const char *prefix, const char *dir, const char *file,
|
||||||
char **slashp);
|
char const **slashp);
|
||||||
|
|
||||||
/* env.c */
|
/* env.c */
|
||||||
char **env_get(void);
|
char **env_get(void);
|
||||||
|
Reference in New Issue
Block a user