]> granicus.if.org Git - sudo/commitdiff
Make user_cwd const since it is either a string literal or passed
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 24 Oct 2012 20:32:43 +0000 (16:32 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 24 Oct 2012 20:32:43 +0000 (16:32 -0400)
in from the front-end.

plugins/sudoers/iolog_path.c
plugins/sudoers/logging.c
plugins/sudoers/sudoers.h

index fec178142cee15b674cf2de46d6fdb9f516ccd76..c0947f10b3073351042a24b3bd3bdcd94c2dd0ed 100644 (file)
@@ -158,7 +158,7 @@ static struct path_escape io_path_escapes[] = {
  */
 char *
 expand_iolog_path(const char *prefix, const char *dir, const char *file,
-    char **slashp)
+    char const **slashp)
 {
     size_t len, prelen = 0;
     char *dst, *dst0, *path, *pathend, tmpbuf[PATH_MAX];
index 11166101f8ecd6ae2d988ea07dac0e96469cd17f..4b1522d4270b115a023bd78a6c45266989275012 100644 (file)
@@ -742,7 +742,8 @@ new_logline(const char *message, int serrno)
     size_t len = 0;
     char *errstr = 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)
 
     /* A TSID may be a sudoers-style session ID or a free-form string. */
index d066c03ad36f844de5d89c6d261cd6d9db92fe0b..9e731a5474bbfd7212029598c4243d1ca140f5a0 100644 (file)
@@ -85,8 +85,8 @@ struct sudo_user {
     char *privs;
     char *limitprivs;
 #endif
-    char *cwd;
-    char *iolog_file;
+    const char *cwd;
+    const char *iolog_file;
     GETGROUPS_T *gids;
     int   ngids;
     int   closefrom;
@@ -323,7 +323,7 @@ void io_nextid(char *iolog_dir, char *iolog_dir_fallback, char sessid[7]);
 
 /* iolog_path.c */
 char *expand_iolog_path(const char *prefix, const char *dir, const char *file,
-    char **slashp);
+    char const **slashp);
 
 /* env.c */
 char **env_get(void);