[systemd-devel] [PATCH] man: improve word usage and grammar in logind.conf(5)

2013-07-09 Thread Jason St. John
From: Jason St. John jstj...@purdue.edu

---
 man/logind.conf.xml | 33 +
 1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/man/logind.conf.xml b/man/logind.conf.xml
index 74a100e..8ab6d72 100644
--- a/man/logind.conf.xml
+++ b/man/logind.conf.xml
@@ -72,8 +72,8 @@
 listitemparaTakes a positive
 integer. Configures how many virtual
 terminals (VTs) to allocate by default
-that -- when switched to and
-previously unused --
+that, when switched to and are
+previously unused,
 literalautovt/literal services are
 automatically spawned on. These
 services are instantiated from the
@@ -116,14 +116,14 @@
 filenameautovt@.service/filename
 activation (see above). The VT
 selected with this option will be
-marked busy unconditionally so that no
+marked busy unconditionally, so that no
 other subsystem will allocate it. This
 functionality is useful to ensure that
-regardless how many VTs are allocated
+regardless of how many VTs are allocated
 by other subsystems, one login
 literalgetty/literal is always
-available. Defaults to 6 (with other
-words: there will always be a
+available. Defaults to 6 (in other
+words, there will always be a
 literalgetty/literal available on
 Alt-F6.). When set to 0, VT
 reservation is
@@ -161,11 +161,11 @@
 user sessions correctly report the
 idle status to the system. The system
 will execute the action after all
-sessions reported that they are idle,
-and no idle inhibitor lock is active,
-and subsequently the time configured
+sessions report that they are idle,
+no idle inhibitor lock is active,
+and subsequently, the time configured
 with varnameIdleActionSec=/varname
-(see below) has passed./para
+(see below) has expired./para
 /listitem
 /varlistentry
 
@@ -197,7 +197,7 @@
 killed. varnameKillExcludeUsers=/varname
 defaults to literalroot/literal
 and takes precedence over
-varnameKillOnlyUsers=/varname
+varnameKillOnlyUsers=/varname,
 which defaults to the empty 
list./para/listitem
 /varlistentry
 
@@ -221,8 +221,9 @@
 varnameControllers=/varname and be
 reset to the root control group in all
 hierarchies listed in
-varnameResetControllers=/varname. 
varnameControllers=/varname
-defaults to the empty list,
+varnameResetControllers=/varname.
+varnameControllers=/varname
+defaults to the empty list.
 varnameResetControllers=/varname
 defaults to
 literalcpu/literal. Note that for
@@ -243,8 +244,8 @@
 time a system shutdown or sleep
 request is delayed due to an inhibitor
 lock of type literaldelay/literal
-being active -- before it is ignored
-and the operation executed
+being active before the inhibitor is
+ignored and the operation executes
 anyway. Defaults to
 5s./para/listitem
 /varlistentry
@@ -311,7 +312,7 @@
 

Re: [systemd-devel] [PATCH] man: wording and grammar updates

2013-07-09 Thread Zbigniew Jędrzejewski-Szmek
On Mon, Jul 08, 2013 at 06:19:02PM +0200, Jan Engelhardt wrote:
 ---
  man/machinectl.xml |  14 ++--
  man/systemctl.xml  | 180 
 -
  man/systemd.journal-fields.xml |   8 +-
  3 files changed, 101 insertions(+), 101 deletions(-)
Applied.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] man: improve word usage and grammar in logind.conf(5)

2013-07-09 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Jul 09, 2013 at 01:12:05PM +0200, Jason St. John wrote:
 From: Jason St. John jstj...@purdue.edu
 
 ---
  man/logind.conf.xml | 33 +
  1 file changed, 17 insertions(+), 16 deletions(-)
Applied.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 1/3] unit: check correct variable after strdup

2013-07-09 Thread Lukas Nykryn
---
 src/core/unit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/unit.c b/src/core/unit.c
index 447f201..b3f9832 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2302,7 +2302,7 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) {
 char *s;
 
 s = strdup(v);
-if (!v)
+if (!s)
 return -ENOMEM;
 
 free(u-cgroup_path);
-- 
1.8.1.4

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Patch for Smack labelling support in udev

2013-07-09 Thread Reshetova, Elena
Hi,

Does the attached patch look better? I have fixed the sequence of xattr 
processing (now just after uid, gid, mode and etc.) + switched to use a list 
for collecting the xattrs.
I think it is more generic to allow many xattrs to be set for one node, since 
it is normal use case.

Best Regards,
Elena



-Original Message-
From: Kay Sievers [mailto:k...@vrfy.org]
Sent: Wednesday, July 03, 2013 2:23 PM
To: Reshetova, Elena
Cc: Lennart Poettering; systemd-devel@lists.freedesktop.org; Ware, Ryan R; 
Schaufler, Casey; walyong@samsung.com
Subject: Re: [systemd-devel] Patch for Smack labelling support in udev

On Wed, Jul 3, 2013 at 1:04 PM, Reshetova, Elena elena.reshet...@intel.com 
wrote:

Things like:
  ..., XATTR{foo}=foo, XATTR{bar}=bar
would just eat the entire foo key. That is intentional? We usually
have lists for that, or we would not allow 2 keys ...

 Hm.. Do we want to allow multiple xattr setup on the same node?

I don't know. But we need to sure what we want and document it that way. :)

 I guess this
 can make sense if for example one is to setup the security label and
 another one some other attribute.
 So, I guess then it has to be stored in a list. I will take a look on
 how it is done for other cases.
 Could you please point to the right example on how such case is
 handled in udev (maybe from other permissions or attributes)? Some
 particular case that I should take as an example?

udev_list_entry_add(event-run_list, ...

and quite a few other examples.

If pairs of values that belong to each other are allocated, we better
check if we run into allocation problems. Udev ignores that in some
places and goes ahead as the value would not have been set at all. But
with pairs, we should not end up with inconsistent pairs which have only the 
name or the value set.
The:
  if ((xattr_name)  (xattr_label))
should then just become:
  if (xattr_name)

 OK, and then I guess I would need to check during parcing that they
 are both set correctly and unset the other one, if one is missing, right?

Yeah, it's pretty simple: just always leave a clean state, or give up where 
the error happens. Do leave invalid/partial data around and try to cope with 
it later.

Kay


0001-Adding-extended-attribute-support-for-udev-nodes-lab.patch
Description: Binary data


smime.p7s
Description: S/MIME cryptographic signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Patch for Smack labelling support in udev

2013-07-09 Thread Kay Sievers
On Tue, Jul 9, 2013 at 3:47 PM, Reshetova, Elena
elena.reshet...@intel.com wrote:
 Does the attached patch look better? I have fixed the sequence of xattr
 processing (now just after uid, gid, mode and etc.) + switched to use a list
 for collecting the xattrs.
 I think it is more generic to allow many xattrs to be set for one node, since
 it is normal use case.

 @@ -252,11 +256,13 @@ void udev_node_update_old_links(struct udev_device 
 *dev, struct udev_device *dev
  }
 }

 -static int node_permissions_apply(struct udev_device *dev, bool apply, 
 mode_t mode, uid_t uid, gid_t gid)
 +static int node_permissions_apply(struct udev_device *dev, bool apply, 
 mode_t mode,
 +  uid_t uid, gid_t gid, struct udev_list 
 xattr_list)

Guess we better pass the udev_list as a const pointer here.

 @@ -288,13 +294,28 @@ static int node_permissions_apply(struct udev_device 
 *dev, bool apply, mode_t mo
  label_fix(devnode, true, false);
  }

 +udev_list_entry_foreach(xattr_entry, xattr_list) {

Does that really work with the non-pointer, seems a bit odd that way?

 @@ -2307,6 +2323,24 @@ int udev_rules_apply_to_event(struct udev_rules 
 *rules, struct udev_event *event
rules_str(rules, rule-rule.filename_off),
rule-rule.filename_line);
  break;
 +   case TK_A_XATTR: {
 +struct udev_list_entry *xattr_entry;

This seems unused.

Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Patch for Smack labelling support in udev

2013-07-09 Thread Reshetova, Elena
 -static int node_permissions_apply(struct udev_device *dev, bool
 apply, mode_t mode, uid_t uid, gid_t gid)
 +static int node_permissions_apply(struct udev_device *dev, bool apply, 
 mode_t mode,
 +  uid_t uid, gid_t gid, struct
 +udev_list xattr_list)

Guess we better pass the udev_list as a const pointer here.

Ups, sorry, missed this one, of course it won't even work this way (I haven't 
tried to run it yet - I am setting the environment right now since I don't 
have systemd-powered machine as a host).
Here is the fixed patch with the unused part removed also.

Best Regards,
Elena.



-Original Message-
From: Kay Sievers [mailto:k...@vrfy.org]
Sent: Tuesday, July 09, 2013 5:03 PM
To: Reshetova, Elena
Cc: Lennart Poettering; systemd-devel@lists.freedesktop.org; Ware, Ryan R; 
Schaufler, Casey; walyong@samsung.com
Subject: Re: [systemd-devel] Patch for Smack labelling support in udev

On Tue, Jul 9, 2013 at 3:47 PM, Reshetova, Elena elena.reshet...@intel.com 
wrote:
 Does the attached patch look better? I have fixed the sequence of
 xattr processing (now just after uid, gid, mode and etc.) + switched
 to use a list for collecting the xattrs.
 I think it is more generic to allow many xattrs to be set for one
 node, since it is normal use case.

 @@ -252,11 +256,13 @@ void udev_node_update_old_links(struct udev_device 
 *dev, struct udev_device *dev
  }
 }

 -static int node_permissions_apply(struct udev_device *dev, bool
 apply, mode_t mode, uid_t uid, gid_t gid)
 +static int node_permissions_apply(struct udev_device *dev, bool apply, 
 mode_t mode,
 +  uid_t uid, gid_t gid, struct
 +udev_list xattr_list)

Guess we better pass the udev_list as a const pointer here.

 @@ -288,13 +294,28 @@ static int node_permissions_apply(struct udev_device 
 *dev, bool apply, mode_t mo
  label_fix(devnode, true, false);
  }

 +udev_list_entry_foreach(xattr_entry, xattr_list) {

Does that really work with the non-pointer, seems a bit odd that way?

 @@ -2307,6 +2323,24 @@ int udev_rules_apply_to_event(struct udev_rules 
 *rules, struct udev_event *event
rules_str(rules, 
 rule-rule.filename_off),
rule-rule.filename_line);
  break;
 +   case TK_A_XATTR: {
 +struct udev_list_entry *xattr_entry;

This seems unused.

Kay


0001-Adding-extended-attribute-support-for-udev-nodes-lab.patch
Description: Binary data


smime.p7s
Description: S/MIME cryptographic signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] travis: Add a travis.yml for doing CI after commits

2013-07-09 Thread Holger Hans Peter Freyther
From: Holger Hans Peter Freyther hol...@moiji-mobile.com

Instruct travis-ci to build systemd and create a tarball. In case
of an error travis-ci will complain on IRC. The systemd testsuite
currently requires the host to have a recent version of systemd
installed and running. This is not the case for the Ubuntu VM of
travis-ci. This means make check and make distcheck will result in
a build failure and to avoid this these commands are not executed.

This requires a one time configuration on travis-ci for the repo
on github by the owner of the repo.
---
 .travis.yml |   13 +
 1 file changed, 13 insertions(+)
 create mode 100644 .travis.yml

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000..42433fd
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,13 @@
+language: c
+compiler:
+  - gcc
+before_install:
+ - sudo apt-get update -qq
+ - sudo apt-get install autotools-dev automake autoconf libtool libdbus-1-dev 
libcap-dev libblkid-dev libpam-dev libcryptsetup-dev libaudit-dev libacl1-dev 
libattr1-dev libselinux-dev liblzma-dev libgcrypt-dev libqrencode-dev 
libmicrohttpd-dev gtk-doc-tools gperf
+script: ./autogen.sh  ./configure --enable-gtk-doc --enable-gtk-doc-pdf  
make V=1  make dist V=1
+notifications:
+  irc:
+channels:
+  - irc.freenode.org#systemd
+on_success: change
+on_failure: always
-- 
1.7.10.4

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 3/3 (rebased)] cryptsetup: Add tcrypt support

2013-07-09 Thread Jan Janssen
Tcrypt uses a different approach to passphrases/key files. The
passphrase and all key files are incorporated into the password
to open the volume. So, the idea of slots that provide a way to
open the volume with different passphrases/key files that are
independent from each other like with LUKS does not apply.

Therefore, we use the key file from /etc/crypttab as the source
for the passphrase. The actual key files that are combined with
the passphrase into a password are provided as a new option in
/etc/crypttab and can be given multiple times if more than one
key file is used by a volume.
---
Hi,
this is just a rebase so this patch applies cleanly. The other two
patches still work.

I would really like to see this one get in. I've been using this
to mount my system encrypted truecrypt partition ever since I
cooked this up and it works very nicely.

Anyone who wants to test system encryption mode should probably
get themselves the latest git version of cryptsetup since it
contains a few fixes for that mode (mainly making this mode work
on a drive with other patitions already mounted/in use). But as long
as you don't use system mode (removeable media, truecrypt container
files, or non-system encrypted partitions) you'd only need
cryptsetup 1.6.0.

Thanks,
Jan

 man/crypttab.xml| 300 +++-
 src/cryptsetup/cryptsetup.c |  81 +++-
 2 files changed, 259 insertions(+), 122 deletions(-)

diff --git a/man/crypttab.xml b/man/crypttab.xml
index e52b7e6..298f39e 100644
--- a/man/crypttab.xml
+++ b/man/crypttab.xml
@@ -75,23 +75,29 @@
 fields are mandatory, the remaining two are
 optional./para
 
+paraSetting up encrypted block devices using this file
+supports three encryption modes: LUKS, TrueCrypt and plain.
+See 
citerefentryrefentrytitlecryptsetup/refentrytitlemanvolnum8/manvolnum/citerefentry
+for more information about each mode. When no mode is specified
+in the options field and the block device contains a LUKS
+signature, it is opened as a LUKS device; otherwise, it is
+assumed to be in raw dm-crypt (plain mode) format./para
+
 paraThe first field contains the name of the
 resulting encrypted block device; the device is set up
 within filename/dev/mapper//filename./para
 
 paraThe second field contains a path to the
-underlying block device, or a specification of a block
+underlying block device or file, or a specification of a block
 device via literalUUID=/literal followed by the
-UUID.  If the block device contains a LUKS signature,
-it is opened as a LUKS encrypted partition; otherwise,
-it is assumed to be a raw dm-crypt partition./para
+UUID./para
 
 paraThe third field specifies the encryption
 password.  If the field is not present or the password
-is set to none, the password has to be manually
-entered during system boot.  Otherwise, the field is
-interpreted as a path to a file containing the
-encryption password.  For swap encryption,
+is set to literalnone/literal or literal-/literal,
+the password has to be manually entered during system boot.
+Otherwise, the field is interpreted as a absolute path to
+a file containing the encryption password. For swap encryption,
 filename/dev/urandom/filename or the hardware
 device filename/dev/hw_random/filename can be used
 as the password file; using
@@ -104,181 +110,237 @@
 options are recognized:/para
 
 variablelist class='crypttab-options'
+
+varlistentry
+termvarnameallow-discards/varname/term
+
+listitemparaAllow discard requests to be
+passed through the encrypted block device. This
+improves performance on SSD storage but has
+security implications./para/listitem
+/varlistentry
+
 varlistentry
 termvarnamecipher=/varname/term
 
-listitemparaSpecifies the cipher
-to use; see
+listitemparaSpecifies the cipher to use. 
See
 
citerefentryrefentrytitlecryptsetup/refentrytitlemanvolnum8/manvolnum/citerefentry
-for possible values and the default
-value of this option.  A cipher with
-  

[systemd-devel] [PATCH] basic SO_REUSEPORT support

2013-07-09 Thread Shawn
-- 

---
Shawn Landden
+1 360 389 3001 (SMS preferred)


0001-basic-SO_REUSEPORT-support.patch
Description: Binary data
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] basic SO_REUSEPORT support

2013-07-09 Thread Cristian Rodríguez

El 09/07/13 16:01, Shawn escribió:


It should IMHO all be wrapped in #ifdef SO_REUSEPORT
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] basic SO_REUSEPORT support

2013-07-09 Thread Tomasz Torcz
On Tue, Jul 09, 2013 at 01:01:13PM -0700, Shawn wrote:
 -- 

  How do you envision using this?  Does it even make sense with
systemd-managed sockets?

-- 
Tomasz Torcz Morality must always be based on practicality.
xmpp: zdzich...@chrome.pl-- Baron Vladimir Harkonnen

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] basic SO_REUSEPORT support

2013-07-09 Thread Lennart Poettering
On Tue, 09.07.13 16:28, Cristian Rodríguez (crrodrig...@opensuse.org) wrote:

 It should IMHO all be wrapped in #ifdef SO_REUSEPORT

No need for that, adding this to missing.h the way the patch did is
sufficient. This feature won't work on newer kernels, but it's totally
fine to compile that even on older kernels.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] basic SO_REUSEPORT support

2013-07-09 Thread Lennart Poettering
On Tue, 09.07.13 13:01, Shawn (shawnland...@gmail.com) wrote:

Heya,

reuse is an english word, hence no need to put a middle capital letter
in it, i.e. ReUsePort looks wrong, ReusePort looks better.

The thing is a boolean, so it should have type bool. It's not an int.

Also, there are tabs in the sources, please use spaces instead.

How precisely is this supposed to be used, can you provide an example?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel