[systemd-commits] 3 commits - Makefile.am NEWS configure.ac src/login src/namespace.c src/systemd
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Feb 14 19:59:32 PST 2012
Makefile.am | 6 +++---
NEWS | 13 +++++++++++++
configure.ac | 2 +-
src/login/libsystemd-login.sym | 1 +
src/login/sd-login.c | 4 ++++
src/login/test-login.c | 6 +++++-
src/namespace.c | 8 ++++++++
src/systemd/sd-login.h | 3 +++
8 files changed, 38 insertions(+), 5 deletions(-)
New commits:
commit 437b7dee328738b7aca89a9c7527f228ff8f2d34
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Feb 15 05:00:27 2012 +0100
build-sys: prepare release of 43
diff --git a/Makefile.am b/Makefile.am
index 983ea16..9762da1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,9 +20,9 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = po
-LIBSYSTEMD_LOGIN_CURRENT=1
-LIBSYSTEMD_LOGIN_REVISION=2
-LIBSYSTEMD_LOGIN_AGE=1
+LIBSYSTEMD_LOGIN_CURRENT=2
+LIBSYSTEMD_LOGIN_REVISION=0
+LIBSYSTEMD_LOGIN_AGE=2
LIBSYSTEMD_DAEMON_CURRENT=0
LIBSYSTEMD_DAEMON_REVISION=1
diff --git a/NEWS b/NEWS
index 048abcc..53ef982 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,18 @@
systemd System and Service Manager
+CHANGES WITH 43:
+ * This is mostly a bugfix release
+
+ * systems lacking /etc/os-release are no longer supported.
+
+ * Various functionality updates to libsystemd-login.so
+
+ * Track class of PAM logins to distuingish greeters from
+ normal user logins.
+
+ Contributions from: Kay Sievers, Lennart Poettering, Michael
+ Biebl
+
CHANGES WITH 42:
* This is an important bugfix release for v41.
diff --git a/configure.ac b/configure.ac
index 39a9f88..62e8cdf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@
AC_PREREQ(2.63)
-AC_INIT([systemd],[42],[systemd-devel at lists.freedesktop.org])
+AC_INIT([systemd],[43],[systemd-devel at lists.freedesktop.org])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
commit 21d279cf543c82705a5b3362818805603d2ab9f2
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Feb 15 04:56:59 2012 +0100
namespace: temporaily reset umask when creating private /tmp
diff --git a/src/namespace.c b/src/namespace.c
index a06cac1..09bc829 100644
--- a/src/namespace.c
+++ b/src/namespace.c
@@ -253,11 +253,19 @@ int setup_namespace(
}
if (need_private) {
+ mode_t u;
+
memcpy(private_dir, tmp_dir, sizeof(tmp_dir)-1);
+
+ u = umask(0000);
if (mkdir(private_dir, 0777 + S_ISVTX) < 0) {
+ umask(u);
+
r = -errno;
goto fail;
}
+
+ umask(u);
remove_private = true;
}
commit fc8af9ff3fbbbf21bf26f21d2eb100f26afc201a
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Feb 15 04:56:10 2012 +0100
login: introduce sd_session_get_display()
diff --git a/src/login/libsystemd-login.sym b/src/login/libsystemd-login.sym
index 2ae376d..a5e6c1e 100644
--- a/src/login/libsystemd-login.sym
+++ b/src/login/libsystemd-login.sym
@@ -44,4 +44,5 @@ LIBSYSTEMD_LOGIN_43 {
global:
sd_session_get_type;
sd_session_get_class;
+ sd_session_get_display;
} LIBSYSTEMD_LOGIN_38;
diff --git a/src/login/sd-login.c b/src/login/sd-login.c
index c100a7b..887c421 100644
--- a/src/login/sd-login.c
+++ b/src/login/sd-login.c
@@ -475,6 +475,10 @@ _public_ int sd_session_get_class(const char *session, char **class) {
return session_get_string(session, "CLASS", class);
}
+_public_ int sd_session_get_display(const char *session, char **display) {
+ return session_get_string(session, "DISPLAY", display);
+}
+
static int file_of_seat(const char *seat, char **_p) {
char *p;
int r;
diff --git a/src/login/test-login.c b/src/login/test-login.c
index 2aaa31f..dd84042 100644
--- a/src/login/test-login.c
+++ b/src/login/test-login.c
@@ -30,7 +30,7 @@
int main(int argc, char* argv[]) {
int r, k;
uid_t u, u2;
- char *seat, *type, *class;
+ char *seat, *type, *class, *display;
char *session;
char *state;
char *session2;
@@ -83,6 +83,10 @@ int main(int argc, char* argv[]) {
printf("class = %s\n", class);
free(class);
+ assert_se(sd_session_get_display(session, &display) >= 0);
+ printf("display = %s\n", display);
+ free(display);
+
assert_se(sd_session_get_seat(session, &seat) >= 0);
printf("seat = %s\n", seat);
diff --git a/src/systemd/sd-login.h b/src/systemd/sd-login.h
index 879e074..2f3c90c 100644
--- a/src/systemd/sd-login.h
+++ b/src/systemd/sd-login.h
@@ -96,6 +96,9 @@ int sd_session_get_type(const char *session, char **type);
/* Determine the class of this session, i.e. one of "user", "greeter" or "lock-screen". */
int sd_session_get_class(const char *session, char **class);
+/* Determine the X11 display of this session. */
+int sd_session_get_display(const char *session, char **display);
+
/* Return active session and user of seat */
int sd_seat_get_active(const char *seat, char **session, uid_t *uid);
More information about the systemd-commits
mailing list