search for: old_umask

Displaying 14 results from an estimated 14 matches for "old_umask".

Did you mean: old_mask
2005 Jul 06
0
[PATCH] Simplify Kerberos credentials cache code
...RCS file: /cvs/openssh/auth-krb5.c,v retrieving revision 1.25 diff -u -r1.25 auth-krb5.c --- auth-krb5.c 11 Sep 2004 13:32:09 -0000 1.25 +++ auth-krb5.c 6 Jul 2005 10:31:51 -0000 @@ -67,9 +67,6 @@ #ifndef HEIMDAL krb5_creds creds; krb5_principal server; - char ccname[40]; - int tmpfd; - mode_t old_umask; #endif krb5_error_code problem; krb5_ccache ccache = NULL; @@ -146,28 +143,7 @@ goto out; } - snprintf(ccname,sizeof(ccname),"FILE:/tmp/krb5cc_%d_XXXXXX",geteuid()); - - old_umask = umask(0177); - tmpfd = mkstemp(ccname + strlen("FILE:")); - umask(old_umask); - if (...
2020 Sep 25
0
[RFC PATCH 01/19] tools/virtiofsd: add support for --socket-group
...ser.h" @@ -924,15 +926,29 @@ static int fv_create_listen_socket(struct fuse_session *se) /* * Unfortunately bind doesn't let you set the mask on the socket, - * so set umask to 077 and restore it later. + * so set umask appropriately and restore it later. */ - old_umask = umask(0077); + if (se->vu_socket_group) { + old_umask = umask(S_IROTH | S_IWOTH | S_IXOTH); + } else { + old_umask = umask(S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH); + } if (bind(listen_sock, (struct sockaddr *)&un, addr_len) == -1) { f...
2007 Oct 18
0
[PATCH] Use credentials and permissions on control socket where available
...p;greeting, sizeof greeting) == -1) { logger(LOG_ERR, _("Cannot send greeting for new control connection: %s"), @@ -213,6 +214,7 @@ static int control_compare(const struct event *a, const struct event *b) { bool init_control() { int result; struct sockaddr_un addr; + mode_t old_umask; if(strlen(controlsocketname) >= sizeof addr.sun_path) { logger(LOG_ERR, _("Control socket filename too long!")); @@ -230,7 +232,11 @@ bool init_control() { return false; } - //unlink(controlsocketname); + /* + * Restrict access to the control socket. + * I believe this...
2007 Aug 03
1
race condition with ControlMaster=auto
...ATE OR GOOD, OCCASIONALLY POOR. -------------- next part -------------- --- ssh.c~ Fri Jan 5 05:30:17 2007 +++ ssh.c Fri Aug 3 19:21:18 2007 @@ -1045,18 +1045,19 @@ } } -static void -ssh_control_listener(void) +static int +ssh_control_listener(int test) { struct sockaddr_un addr; mode_t old_umask; int addr_len; if (options.control_path == NULL || - options.control_master == SSHCTL_MASTER_NO) - return; + options.control_master == SSHCTL_MASTER_NO || + control_fd != -1) + return 1; - debug("setting up multiplex master socket"); + debug("trying to set up mu...
2003 Nov 17
1
rsync --daemon and logfile that can't be created
...fname) { if (*logfname) { log_open(); - return; + if (logfile) + return; + /* fall back to syslog if opening log file fails */ } - logfname = NULL; + logfname = NULL; } #ifdef LOG_NDELAY @@ -191,6 +193,12 @@ int old_umask = umask(022 | orig_umask); logfile = fopen(logfname, "a"); umask(old_umask); + if (!logfile) { + char buf[512]; + sprintf(buf, "logfile %.400s could not be opened, errno %d", logfname, errno); + logfna...
2006 Feb 10
0
OpenSSH ControlAllowUsers, et al Patch
...edentials Index: ssh.c =================================================================== --- ssh.c (revision 15802) +++ ssh.c (revision 15803) @@ -1012,7 +1012,7 @@ if ((control_fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) fatal("%s socket(): %s\n", __func__, strerror(errno)); - old_umask = umask(0177); + old_umask = umask(options.control_bind_mask); if (bind(control_fd, (struct sockaddr*)&addr, addr_len) == -1) { control_fd = -1; if (errno == EINVAL || errno == EADDRINUSE) Index: clientloop.c =================================================================== --- client...
2008 Dec 04
0
[patch] muxserver_listen() doesn't restore umask when bind fails
...000000000 +0200 --- mux.c 2008-12-04 12:24:45.000000000 +0100 *************** *** 148,153 **** --- 148,154 ---- error("ControlSocket %s already exists, " "disabling multiplexing", options.control_path); close(muxserver_sock); + umask(old_umask); muxserver_sock = -1; xfree(options.control_path); options.control_path = NULL;
2015 Mar 04
1
IP drop list
On 03/04/2015 09:45 PM, Dave McGuire wrote: > On 03/04/2015 03:37 PM, Oliver Welter wrote: >> Am 04.03.2015 um 21:03 schrieb Dave McGuire: >>> Am 04.03.2015 um 20:12 schrieb Michael Orlitzky: >>>> Please add [DNSBL] support to iptables instead of Dovecot. It's a waste of >>>> effort to code it into every application that listens on the network.
2010 Jan 14
1
ssh(1) multiplexing rewrite
...t muxclient_t /* PID of multiplex server */ static u_int muxserver_pid = 0; +static Channel *mux_listener_channel = NULL; -/* ** Multiplexing master support */ - -/* Prepare a mux master to listen on a Unix domain socket. */ -void -muxserver_listen(void) -{ - struct sockaddr_un addr; - mode_t old_umask; - - if (options.control_path == NULL || - options.control_master == SSHCTL_MASTER_NO) - return; - - debug("setting up multiplex master socket"); - - memset(&addr, '\0', sizeof(addr)); - addr.sun_family = AF_UNIX; - addr.sun_len = offsetof(struct sockaddr_un, sun_path) +...
2013 Oct 25
2
[PATCH] support SO_REUSEPORT on new listeners (:reuseport)
...RT = 0x0200 # untested + else + SO_REUSEPORT = 15 # only tested on x86_64 and i686 + end + end when /freebsd/ # do not send out partial frames (FreeBSD) TCP_NOPUSH = 4 unless defined?(TCP_NOPUSH) @@ -142,9 +151,9 @@ module Unicorn File.umask(old_umask) end elsif /\A\[([a-fA-F0-9:]+)\]:(\d+)\z/ =~ address - new_ipv6_server($1, $2.to_i, opt) + new_tcp_server($1, $2.to_i, opt.merge(:ipv6=>true)) elsif /\A(\d+\.\d+\.\d+\.\d+):(\d+)\z/ =~ address - Kgio::TCPServer.new($1, $2.to_i) + new_tcp_server...
2020 Sep 25
20
[RFC PATCH 00/19] vhost-user-rpmb (Replay Protected Memory Block)
Hi, This is an initial implementation of a vhost-user backend for the VirtIO RPMB device. The device is currently in the draft of the next VirtIO specification and describes block device which uses combination of a key, nonce, hashing and a persistent write counter to prevent replay attacks (hence Replay Protected Memory Block). It is implemented as a vhost-user device because we want to
2017 Dec 22
2
Re: [BUG] Not exiting media forced a promptly close of libvirt 3.10
...ck"         timeout = -1         verbose = 0         godaemon = 1         ipsock = 0         config = 0x5557f23845a0         privileged = <optimized out>         implicit_conf = <optimized out>         run_dir = 0x5557f2392d30 "/usr/local/var/run/libvirt"         old_umask = <optimized out>         opts = {{name = 0x5557f0d76acc "verbose", has_arg = 0, flag = 0x7ffdf2c76860, val = 118}, {name = 0x5557f0d76ad4 "daemon",             has_arg = 0, flag = 0x7ffdf2c76864, val = 100}, {name = 0x5557f0d76adb "listen", has_arg = 0, flag...
2017 Dec 22
2
[BUG] Not exiting media forced a promptly close of libvirt 3.10
Hello, In the .xml file I use a media which is no longer available. In the past, I got the information media not available and the creation of the VM was stopped - O.k. behavior. Since 3.10 the libvirtd stopped promptly and all open consoles windows and the virt-manager closed promptly. For diagnose: etcsvms1:/kvm/CS8200/M5 # coredumpctl TIME PID UID GID SIG
2014 Jul 15
3
GSSAPI
If I am trying to build OpenSSH 6.6 with Kerberos GSSAPI support, do I still need to get Simon Wilkinson's patches? --- Scott Neugroschl | XYPRO Technology Corporation 4100 Guardian Street | Suite 100 |Simi Valley, CA 93063 | Phone 805 583-2874|Fax 805 583-0124 |