Displaying 15 results from an estimated 15 matches for "do_mknod".
2013 Jul 19
2
[Bug 10037] New: do_mknod fails to create socket file
https://bugzilla.samba.org/show_bug.cgi?id=10037
Summary: do_mknod fails to create socket file
Product: rsync
Version: 3.0.9
Platform: All
OS/Version: Solaris
Status: NEW
Severity: normal
Priority: P5
Component: core
AssignedTo: wayned at samba.org
ReportedBy: simon.kl...
2015 Jan 15
1
[PATCH] mknod: filter modes in mkfifo, mknod_b, mknod_c (RHBZ#1182463).
...knod_available (void)
return 1;
}
+#define CHECK_MODE \
+ do { \
+ if ((mode & ~07777) != 0) { \
+ reply_with_error ("%o: mode must specify only file permission bits", \
+ (unsigned int) mode); \
+ return -1; \
+ } \
+ } while (0)
+
int
do_mknod (int mode, int devmajor, int devminor, const char *path)
{
@@ -63,18 +72,24 @@ do_mknod (int mode, int devmajor, int devminor, const char *path)
int
do_mkfifo (int mode, const char *path)
{
+ CHECK_MODE;
+
return do_mknod (mode | S_IFIFO, 0, 0, path);
}
int
do_mknod_b (int mode, int de...
2005 Jul 24
2
[Bug 2868] Allow fifos to be copied by normal users
....samba.org/show_bug.cgi?id=2868
------- Additional Comments From rsync@cpe-24-95-91-210.columbus.res.rr.com 2005-07-23 23:36 -------
this should apply to both fifos and sockets.
creation of both are unprivileged operations,
see mkfifo(2), socket(2)/bind(2) on freebsd.
suggest moving/modifying do_mknod in these sections
backup.c
generator.c
to run regardles of uid and simply complain and continue
on platforms where those syscalls are restricted. just
like if a regular file can't be read due to perm/uid:
rsync: send_files failed to open "/tmp/a.out": Permission denied (13)
any ot...
2005 May 31
0
[Bug 2758] New: "File exists" error using options -b and --backup-dir with device files.
...IS_DEVICE(bufst.st_mode)) {
+ if (do_unlink(buf) < 0)
+ rsyserr(FERROR, errno, "unlink %s failed",
+ full_fname(buf));
+ }
if (do_mknod(buf, file->mode, file->u.rdev) < 0
&& (errno != ENOENT || make_bak_dir(buf) < 0
|| do_mknod(buf, file->mode, file->u.rdev) < 0)) {
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
-------...
2002 Jan 07
0
rsync-2.5.1 / updated syscall.c "const" patch
...1, fname2);
}
+#endif
-#if HAVE_LINK
-int do_link(char *fname1, char *fname2)
+#if SUPPORT_HARD_LINKS
+int do_link(const char *fname1, const char *fname2)
{
if (dry_run) return 0;
CHECK_RO
@@ -58,8 +61,8 @@
return lchown(path, owner, group);
}
-#if HAVE_MKNOD
-int do_mknod(char *pathname, mode_t mode, dev_t dev)
+#ifdef HAVE_MKNOD
+int do_mknod(const char *pathname, mode_t mode, dev_t dev)
{
if (dry_run) return 0;
CHECK_RO
@@ -67,14 +70,14 @@
}
#endif
-int do_rmdir(char *pathname)
+int do_rmdir(const char *pathname)
{
if (dry_run)...
2008 May 22
2
"Invalid argument" error when moving sockets to backup dir
...prints an "Invalid argument" error when
moving sockets to the backup directory (--backup-dir):
rsync: mknod "/backup/machine/../machine-before-4/var/run/audit_events"
failed: Invalid argument (22)
The problem appears to be that, at least with sockets, keep_backup() is
calling do_mknod() with garbage in the third parameter (dev).
When I add some debug output to do_mknod():
printf("mknod pathname=%s, mode=%d, dev=%llu\n", pathname, mode, dev);
int mknodres = mknod(pathname, mode, dev);
printf("mknod result: %d, errno=%d\n", mknodres, errno);
return mk...
2012 Feb 01
1
[PATCH] Clarify the error message when unavailable functions are called (RHBZ#679737).
...c
@@ -1,5 +1,5 @@
/* libguestfs - the guestfsd daemon
- * Copyright (C) 2009 Red Hat Inc.
+ * Copyright (C) 2009-2012 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -67,7 +67,7 @@ do_mknod (int mode, int devmajor, int devminor, const char *path)
return 0;
#else
- NOT_AVAILABLE (-1);
+ NOT_AVAILABLE (mknod, -1);
#endif
}
diff --git a/daemon/modprobe.c b/daemon/modprobe.c
index 1063043..d7c5656 100644
--- a/daemon/modprobe.c
+++ b/daemon/modprobe.c
@@ -1,5 +1,5 @@
/* libgu...
2002 Mar 07
0
rsync 2.5.2 doens't compile on Tru64 5.1
...searched on this mailing list and apply a patch from Andrew Flury
<andrew@flury.org> to rsync 2.5.2. Now I can't even compile 2.5.2.
Here is the error messages with GNU C compiler:
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c syscall.c -o syscall.o
syscall.c: In function `do_mknod':
syscall.c:81: structure has no member named `sun_len'
syscall.c:81: warning: comparison between signed and unsigned
syscall.c:81: warning: signed and unsigned type in conditional...
2006 Oct 26
1
Storing ownership / device nodes without root
...;--source-fake-
root', they wrap their use of stat/chown to grab/modify the uid/gid/
rdev/mode from/to xattrs of the form user.rsync.fake-
{uid,gid,mode,rdev}. The EA code would also silently drop EAs of
those names.
This seems to me like a pretty easy change that would be quite
useful. do_mknod and do_lchown are already wrapppers. The hardest
part would be tracking down all the uses of stat/fstat/etc and
wrapping them.
What do others think?
If people like this, I'll write it. If people have a better
suggestion, let me know, because I need to solve this!
2002 Mar 14
0
rsync 2.5.2 doens't compile on Tru64 5.1 and FIFO, socket files
...searched on this mailing list and apply a patch from Andrew Flury
<andrew@flury.org> to rsync 2.5.2. Now I can't even compile 2.5.2.
Here is the error messages with GNU C compiler:
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c syscall.c -o syscall.o
syscall.c: In function `do_mknod':
syscall.c:81: structure has no member named `sun_len'
syscall.c:81: warning: comparison between signed and unsigned
syscall.c:81: warning: signed and unsigned type in conditional...
2009 Apr 20
6
DO NOT REPLY [Bug 6280] New: (Bug incl. PATCH) Linux mknod does not work when syncing fifos and sockets from Solaris
...trs were not transferred (see previous errors) (code
23) at main.c(1505) [generator=3.0.6pre1]
Reason: rsync calls mknod ("filename", ..., 0xffffffff), which Linux rejects,
as allowed by POSIX.
rsync should clear the third parameter before calling mknod.
Suggested patch in syscall.c, do_mknod:
111 #ifdef HAVE_MKNOD
112 if (S_ISSOCK (mode) || S_ISFIFO(mode)) {
113 /* this variable is not ignored by Linux 2.6. */
114 dev = 0;
115 }
116 >-------return mknod(pathname, mode, dev);
117 #else
--
Configure bugmail: https://bugzilla.samba.org/userpr...
2004 Sep 22
6
[Bug 1804] FreeBSD's mknod can't create FIFOs and sockets
https://bugzilla.samba.org/show_bug.cgi?id=1804
wayned@samba.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |WONTFIX
------- Additional Comments From wayned@samba.org 2004-09-22 09:56
2008 Mar 04
1
Several changes missing from [HEAD] fileflags.diff
...> int do_symlink(const char *fname1, const char *fname2);
> int do_link(const char *fname1, const char *fname2);
> -int do_lchown(const char *path, uid_t owner, gid_t group);
> +int do_lchown(const char *path, uid_t owner, gid_t group, mode_t
> mode, uint32 fileflags);
> int do_mknod(const char *pathname, mode_t mode, dev_t dev);
> int do_rmdir(const char *pathname);
> int do_open(const char *pathname, int flags, mode_t mode);
> -int do_chmod(const char *path, mode_t mode);
> +int do_chmod(const char *path, mode_t mode, uint32 fileflags);
> +int do_chflags(cons...
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change.
I'll get back to that series shortly ;-)
It turned into a factorization and constification exercise
during which I got a taste of ocaml. Thanks to Rich Jones
for help with a few snippets in generator.ml.
The overall result is that many previously-manually-maintained
bits from daemon/*.c functions are now hoisted into the automatically-
2008 Feb 15
4
Revised flags patch
...char *fname, mode_t mode, uint32 fileflags);
+void undo_make_mutable(const char *fname, mode_t mode, uint32 fileflags);
int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
const char *fnamecmp, int flags);
RETSIGTYPE sig_int(UNUSED(int val));
@@ -296,6 +298,7 @@ int do_mknod(const char *pathname, mode_
int do_rmdir(const char *pathname);
int do_open(const char *pathname, int flags, mode_t mode);
int do_chmod(const char *path, mode_t mode);
+int do_chflags(const char *path, u_long flags);
int do_rename(const char *fname1, const char *fname2);
void trim_trailing_sla...