[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] Debian GNU Hurd packaging branch, procfs-jkoenig-moved, updated. u
From: |
Samuel Thibault |
Subject: |
[SCM] Debian GNU Hurd packaging branch, procfs-jkoenig-moved, updated. upstream/procfs/20130707-23-gb2c7b57 |
Date: |
Sat, 27 Jul 2013 22:25:30 +0000 |
The following commit has been merged in the procfs-jkoenig-moved branch:
commit b2c7b57a5c87d932d1a5513600e38323594fc51f
Merge: bda1c2ddac5cb636eecaa441b0f517820f0a7900
edf72a0bf94d83c1858bb91c0cf39abac5bc4546
Author: Samuel Thibault <address@hidden>
Date: Sat Jul 27 21:02:14 2013 +0000
Merge branch 'procfs-jkoenig' into procfs-jkoenig-moved
diff --combined procfs/Makefile
index c69cb20,5c51c1d..5c51c1d
--- a/procfs/Makefile
+++ b/procfs/Makefile
@@@ -1,7 -1,7 +1,7 @@@
TARGET = procfs
OBJS = procfs.o netfs.o procfs_dir.o \
process.o proclist.o rootdir.o dircat.o main.o
- LIBS = -lnetfs -lps -lfshelp
+ LIBS = -lnetfs -lps -lfshelp -lpthread
CC = gcc
CFLAGS = -Wall -g
@@@ -12,7 -12,7 +12,7 @@@ ifdef PROFIL
CFLAGS= -g -pg
CPPFLAGS= -DPROFILE
LDFLAGS= -static
- LIBS= -lnetfs -lfshelp -liohelp -lps -lports -lthreads -lihash
-lshouldbeinlibc
+ LIBS= -lnetfs -lfshelp -liohelp -lps -lports -lpthread -lihash
-lshouldbeinlibc
endif
CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
diff --combined procfs/main.c
index 1b19c01,90b3e92..90b3e92
--- a/procfs/main.c
+++ b/procfs/main.c
@@@ -37,6 -37,10 +37,10 @@@ pid_t opt_fake_self
pid_t opt_kernel_pid;
uid_t opt_anon_owner;
+ #define NODEV_KEY -1 /* <= 0, so no short option. */
+ #define NOEXEC_KEY -2 /* Likewise. */
+ #define NOSUID_KEY -3 /* Likewise. */
+
static error_t
argp_parser (int key, char *arg, struct argp_state *state)
{
@@@ -104,6 -108,18 +108,18 @@@
else
opt_anon_owner = v;
break;
+
+ case NODEV_KEY:
+ /* Ignored for compatibility with Linux' procfs. */
+ ;;
+
+ case NOEXEC_KEY:
+ /* Ignored for compatibility with Linux' procfs. */
+ ;;
+
+ case NOSUID_KEY:
+ /* Ignored for compatibility with Linux' procfs. */
+ ;;
}
return 0;
@@@ -136,6 -152,12 +152,12 @@@ struct argp argp =
"Be aware that USER will be granted access to the environment and "
"other sensitive information about the processes in question. "
"(default: use uid 0)" },
+ { "nodev", NODEV_KEY, NULL, 0,
+ "Ignored for compatibility with Linux' procfs." },
+ { "noexec", NOEXEC_KEY, NULL, 0,
+ "Ignored for compatibility with Linux' procfs." },
+ { "nosuid", NOSUID_KEY, NULL, 0,
+ "Ignored for compatibility with Linux' procfs." },
{}
},
.parser = argp_parser,
diff --combined procfs/netfs.c
index c139d11,276c57c..276c57c
--- a/procfs/netfs.c
+++ b/procfs/netfs.c
@@@ -230,6 -230,17 +230,17 @@@ void netfs_node_norefs (struct node *np
pthread_spin_lock (&netfs_node_refcnt_lock);
}
+ /* The user may define this function (but should define it together
+ with netfs_set_translator). For locked node NODE with S_IPTRANS
+ set in its mode, look up the name of its translator. Store the
+ name into newly malloced storage, and return it in *ARGZ; set
+ *ARGZ_LEN to the total length. */
+ error_t netfs_get_translator (struct node *np, char **argz,
+ size_t *argz_len)
+ {
+ return procfs_get_translator (np, argz, argz_len);
+ }
+
/* Libnetfs callbacks managed with libfshelp. */
diff --combined procfs/procfs.c
index ae5a676,cae4a51..cae4a51
--- a/procfs/procfs.c
+++ b/procfs/procfs.c
@@@ -19,6 -19,7 +19,7 @@@
#include <stdlib.h>
#include <string.h>
+ #include <unistd.h>
#include <fcntl.h>
#include <mach.h>
#include <hurd/netfs.h>
@@@ -76,6 -77,9 +77,9 @@@ struct node *procfs_make_node (const st
else
np->nn_stat.st_mode = S_IFREG | 0444;
+ np->nn_stat.st_uid = getuid ();
+ np->nn_stat.st_gid = getgid ();
+
return np;
fail:
@@@ -93,7 -97,7 +97,7 @@@ void procfs_node_chown (struct node *np
void procfs_node_chmod (struct node *np, mode_t mode)
{
- np->nn_stat.st_mode = (np->nn_stat.st_mode & S_IFMT) | mode;
+ np->nn_stat.st_mode = (np->nn_stat.st_mode & ~ALLPERMS) | mode;
np->nn_translated = np->nn_stat.st_mode;
}
@@@ -201,3 -205,15 +205,15 @@@ void procfs_cleanup (struct node *np
free (np->nn);
}
+
+ error_t procfs_get_translator (struct node *np,
+ char **argz,
+ size_t *argz_len)
+ {
+ if (np->nn->ops->get_translator)
+ return np->nn->ops->get_translator (np->nn->hook, argz, argz_len);
+
+ *argz = NULL;
+ *argz_len = 0;
+ return 0;
+ }
diff --combined procfs/procfs.h
index 64782ec,d04bbad..d04bbad
--- a/procfs/procfs.h
+++ b/procfs/procfs.h
@@@ -51,6 -51,9 +51,9 @@@ struct procfs_node_op
/* Destroy this node. */
void (*cleanup) (void *hook);
+
+ /* Get the passive translator record. */
+ error_t (*get_translator) (void *hook, char **argz, size_t *argz_len);
};
/* These helper functions can be used as procfs_node_ops.cleanup_contents. */
@@@ -91,3 -94,6 +94,6 @@@ error_t procfs_get_contents (struct nod
error_t procfs_lookup (struct node *np, const char *name, struct node **npp);
void procfs_cleanup (struct node *np);
+ /* Get the passive translator record if any. */
+ error_t procfs_get_translator (struct node *np, char **argz, size_t
*argz_len);
+
diff --combined procfs/rootdir.c
index 31e2d8c,f234dd0..f234dd0
--- a/procfs/rootdir.c
+++ b/procfs/rootdir.c
@@@ -300,7 -300,7 +300,7 @@@ rootdir_gc_meminfo (void *hook, char **
,
(long unsigned) hbi.memory_size / 1024,
(long unsigned) vmstats.free_count * PAGE_SIZE / 1024,
- 0,
+ 0UL,
(long unsigned) cache_stats.cache_count * PAGE_SIZE / 1024,
(long unsigned) vmstats.active_count * PAGE_SIZE / 1024,
(long unsigned) vmstats.inactive_count * PAGE_SIZE / 1024,
@@@ -392,7 -392,7 +392,7 @@@ out
}
static int
- rootdir_fakeself_exists ()
+ rootdir_fakeself_exists (void *dir_hook, const void *entry_hook)
{
return opt_fake_self >= 0;
}
--
Debian GNU Hurd packaging
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] Debian GNU Hurd packaging branch, procfs-jkoenig-moved, updated. upstream/procfs/20130707-23-gb2c7b57,
Samuel Thibault <=