[BACK]Return to server.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rsync

Diff for /src/usr.bin/rsync/server.c between version 1.8 and 1.9

version 1.8, 2019/03/06 18:37:22 version 1.9, 2019/03/23 00:20:55
Line 45 
Line 45 
  * The server (remote) side of the system.   * The server (remote) side of the system.
  * This parses the arguments given it by the remote shell then moves   * This parses the arguments given it by the remote shell then moves
  * into receiver or sender mode depending upon those arguments.   * into receiver or sender mode depending upon those arguments.
  *   * Returns exit code 0 on success, 1 on failure, 2 on failure with
  * Pledges: unveil rpath, cpath, wpath, stdio, fattr.   * incompatible protocols.
  *  
  * Pledges (dry-run): -cpath, -wpath, -fattr.  
  * Pledges (!preserve_times): -fattr.  
  */   */
 int  int
 rsync_server(const struct opts *opts, size_t argc, char *argv[])  rsync_server(const struct opts *opts, size_t argc, char *argv[])
 {  {
         struct sess      sess;          struct sess      sess;
         int              fdin = STDIN_FILENO,          int              fdin = STDIN_FILENO,
                          fdout = STDOUT_FILENO, rc = 0;                           fdout = STDOUT_FILENO, rc = 1;
   
         if (pledge("stdio unix rpath wpath cpath dpath fattr chown getpw unveil",          if (pledge("stdio unix rpath wpath cpath dpath fattr chown getpw unveil",
             NULL) == -1)              NULL) == -1)
Line 161 
Line 158 
                 WARNX(&sess, "data remains in read pipe");                  WARNX(&sess, "data remains in read pipe");
 #endif  #endif
   
         rc = 1;          rc = 0;
 out:  out:
         return rc;          return rc;
 }  }

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9