Re: [systemd-devel] [PATCH] cryptsetup: craft a unique ID with the source device

2015-05-29 Thread Lennart Poettering
On Fri, 29.05.15 17:11, Harald Hoyer (har...@redhat.com) wrote: > Am 29.05.2015 um 17:04 schrieb Lennart Poettering: > > On Fri, 29.05.15 12:17, har...@redhat.com (har...@redhat.com) wrote: > > > >> > >> +static char* disk_maj_min(const char *path) { > > > > I'd really not abbreivate things he

Re: [systemd-devel] [PATCH] cryptsetup: craft a unique ID with the source device

2015-05-29 Thread Harald Hoyer
Am 29.05.2015 um 17:04 schrieb Lennart Poettering: > On Fri, 29.05.15 12:17, har...@redhat.com (har...@redhat.com) wrote: > >> >> +static char* disk_maj_min(const char *path) { > > I'd really not abbreivate things here... call it "major" and > "minor". there's no point in saving two "or"s... >

Re: [systemd-devel] [PATCH] cryptsetup: craft a unique ID with the source device

2015-05-29 Thread Lennart Poettering
On Fri, 29.05.15 17:01, Martin Pitt (martin.p...@ubuntu.com) wrote: > Harald Hoyer [2015-05-29 16:50 +0200]: > > I was more thinking about symlinks pointing to the same device. > > Naïvely I'd think that resolving symlinks would still be more readable > than major/minor numbers; why would that be

Re: [systemd-devel] [PATCH] cryptsetup: craft a unique ID with the source device

2015-05-29 Thread Lennart Poettering
On Fri, 29.05.15 12:17, har...@redhat.com (har...@redhat.com) wrote: > > +static char* disk_maj_min(const char *path) { I'd really not abbreivate things here... call it "major" and "minor". there's no point in saving two "or"s... > +struct stat st, st2; > +char *i = NULL; > +

Re: [systemd-devel] [PATCH] cryptsetup: craft a unique ID with the source device

2015-05-29 Thread Martin Pitt
Harald Hoyer [2015-05-29 16:50 +0200]: > I was more thinking about symlinks pointing to the same device. Naïvely I'd think that resolving symlinks would still be more readable than major/minor numbers; why would that be worse? Thanks, Martin -- Martin Pitt| http://www.pi

Re: [systemd-devel] [PATCH] cryptsetup: craft a unique ID with the source device

2015-05-29 Thread Lennart Poettering
On Fri, 29.05.15 15:45, Dimitri John Ledkov (dimitri.j.led...@intel.com) wrote: > On 29 May 2015 at 11:17, wrote: > > From: Harald Hoyer > > > > If cryptsetup is called with a source device as argv[3], then craft the > > ID for the password agent with a unique device path. > > > > I'm not sure

Re: [systemd-devel] [PATCH] cryptsetup: craft a unique ID with the source device

2015-05-29 Thread Harald Hoyer
Am 29.05.2015 um 16:38 schrieb Lennart Poettering: > On Fri, 29.05.15 16:30, Harald Hoyer (har...@redhat.com) wrote: > >> Am 29.05.2015 um 16:26 schrieb Lennart Poettering: >>> On Fri, 29.05.15 12:17, har...@redhat.com (har...@redhat.com) wrote: >>> From: Harald Hoyer If cryptsetup

Re: [systemd-devel] [PATCH] cryptsetup: craft a unique ID with the source device

2015-05-29 Thread Harald Hoyer
Am 29.05.2015 um 16:45 schrieb Dimitri John Ledkov: > On 29 May 2015 at 11:17, wrote: >> From: Harald Hoyer >> >> If cryptsetup is called with a source device as argv[3], then craft the >> ID for the password agent with a unique device path. >> > > I'm not sure why this is needed... if the devi

Re: [systemd-devel] [PATCH] cryptsetup: craft a unique ID with the source device

2015-05-29 Thread Dimitri John Ledkov
On 29 May 2015 at 11:17, wrote: > From: Harald Hoyer > > If cryptsetup is called with a source device as argv[3], then craft the > ID for the password agent with a unique device path. > I'm not sure why this is needed... if the device path is not good enough, there is also luks UUID header. In

Re: [systemd-devel] [PATCH] cryptsetup: craft a unique ID with the source device

2015-05-29 Thread Lennart Poettering
On Fri, 29.05.15 16:30, Harald Hoyer (har...@redhat.com) wrote: > Am 29.05.2015 um 16:26 schrieb Lennart Poettering: > > On Fri, 29.05.15 12:17, har...@redhat.com (har...@redhat.com) wrote: > > > >> From: Harald Hoyer > >> > >> If cryptsetup is called with a source device as argv[3], then craft

Re: [systemd-devel] [PATCH] cryptsetup: craft a unique ID with the source device

2015-05-29 Thread Harald Hoyer
Am 29.05.2015 um 16:26 schrieb Lennart Poettering: > On Fri, 29.05.15 12:17, har...@redhat.com (har...@redhat.com) wrote: > >> From: Harald Hoyer >> >> If cryptsetup is called with a source device as argv[3], then craft the >> ID for the password agent with a unique device path. >> >> If possible

Re: [systemd-devel] [PATCH] cryptsetup: craft a unique ID with the source device

2015-05-29 Thread Lennart Poettering
On Fri, 29.05.15 12:17, har...@redhat.com (har...@redhat.com) wrote: > From: Harald Hoyer > > If cryptsetup is called with a source device as argv[3], then craft the > ID for the password agent with a unique device path. > > If possible "/dev/block/:" is used, otherwise the original > argv[3] i

Re: [systemd-devel] [PATCH] cryptsetup: craft a unique ID with the source device

2015-05-29 Thread systemd github import bot
Patchset imported to github. Pull request: -- Generated by https://github.com/haraldh/mail2git ___ systemd-devel mailing

[systemd-devel] [PATCH] cryptsetup: craft a unique ID with the source device

2015-05-29 Thread harald
From: Harald Hoyer If cryptsetup is called with a source device as argv[3], then craft the ID for the password agent with a unique device path. If possible "/dev/block/:" is used, otherwise the original argv[3] is used. This enables password agents like petera [1] to provide a password accordin