search for: errno_save

Displaying 4 results from an estimated 4 matches for "errno_save".

2004 Apr 11
1
fchmod in do_mkstemp? (patch included)
...plate) { RETURN_ERROR_IF(dry_run, 0); RETURN_ERROR_IF(read_only, EROFS); @@ -155,21 +155,12 @@ #if defined(HAVE_SECURE_MKSTEMP) && defined(HAVE_FCHMOD) { int fd = mkstemp(template); - if (fd == -1) - return -1; - if (fchmod(fd, perms) != 0 && preserve_perms) { - int errno_save = errno; - close(fd); - unlink(template); - errno = errno_save; - return -1; - } return fd; } #else if (!mktemp(template)) return -1; - return do_open(template, O_RDWR|O_EXCL|O_CREAT, perms); + return do_open(template, O_RDWR|O_EXCL|O_CREAT, 0600); #endif }
2014 May 26
2
[PATCH 2/2] Use setfiles from the appliance for the SELinux relabel (RHBZ#1089100).
...ile ((r = getline (&line, &len, f)) != -1) { + if ((size_t) r >= sizeof (SELINUXTYPE) + 1 + && STRPREFIX (line, SELINUXTYPE "=")) { + *policy = strndup (line + sizeof (SELINUXTYPE), r - sizeof (SELINUXTYPE) - 1); + if (*policy == NULL) { + int errno_save = errno; + fclose (f); + errno = errno_save; + return -1; + } + trim (*policy); + break; + } + } + + fclose (f); + + return 0; +} + +static int +length_without_training_slash (const char *path) { - CLEANUP_FREE char *cmd = NULL, *out = NULL; - const char...
2004 Sep 28
1
[cygwin] Fwd: Updated: rsync-2.6.2-3
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Here goes the announcement of the 2.6.2-3 package for cygwin (available from cygwin's setup itself). If you wonder what "2.6.2-3" means, it's basically the third "cygwin package" that uses rsync-2.6.2 sources. This third attempt solves both the august security fix and the textmode bug that 2.6.2-2 had. follows the
2014 May 24
9
SELinux relabel API
[ I realized that we were discussing adding this feature, in various private email, IRC, and this long bugzilla thread: https://bugzilla.redhat.com/show_bug.cgi?id=1060423 That's not how we should do things. Let's discuss it on the mailing list. ] One thing that virt-customize/virt-sysprep/virt-builder have to do is relabel SELinux guests. What we do at the moment