First use kzalloc to allocate the users array, so we do not reference
unintialized values.
And free the old conn->msg_users array not the newly allocated 'users'
one.
Patch tested, and users will hit the KDBUS_CONN_MAX_MSGS_PER_USER limit
and fail with -ENOBUFS
Signed-off-by: Djalal Harouni
---
kdbus_bus_new() worst case will take the domain lock 3 times:
kdbus_bus_new()
=> kdbus_domain_user_find_or_new(): will take it 2 times
+
kdbus_bus_new(): will take it an extra time to account the user and
link the bus into the domain bus_list.
We can reduce the worst case to take the domain lock
Currently kdbus_domain_user_find_or_new() is used to find a user domain
or create a new one and link it into the domain.
kdbus_domain_user_find_or_new() may fail due to memory allocation
errors or if the domain was shutdown, but since callers will receive
only a NULL pointer on failure, they assum
Add kdbus_domain_user_find() to look up domain users
Signed-off-by: Djalal Harouni
---
domain.c | 32
1 file changed, 32 insertions(+)
diff --git a/domain.c b/domain.c
index 18dc2a7..a5abb2d 100644
--- a/domain.c
+++ b/domain.c
@@ -446,6 +446,38 @@ kdbus_domain_
Add kdbus_domain_user_new() to allocate kdbus_domain_user objects.
Signed-off-by: Djalal Harouni
---
domain.c | 27 +++
1 file changed, 27 insertions(+)
diff --git a/domain.c b/domain.c
index 86fde55..18dc2a7 100644
--- a/domain.c
+++ b/domain.c
@@ -419,6 +419,33 @@ int
Add the lock protected version of __kdbus_domain_user_account(). It
will check if the domain is still active before linking users.
Signed-off-by: Djalal Harouni
---
domain.c | 24
1 file changed, 24 insertions(+)
diff --git a/domain.c b/domain.c
index a321f31..86fde55 1
Add __kdbus_domain_user_account() to account and link users into a
domain.
Signed-off-by: Djalal Harouni
---
domain.c | 32
1 file changed, 32 insertions(+)
diff --git a/domain.c b/domain.c
index c4912fa..a321f31 100644
--- a/domain.c
+++ b/domain.c
@@ -419,6 +4
Hi,
This series improves user domain accounting and fixes some bugs.
On top of the "kdbus: allow multiple policies" series:
http://lists.freedesktop.org/archives/systemd-devel/2014-July/021514.html
Patches 1, 2, 3 and 4 are preparation patches to improve the code.
Patch 5 fixes kdbus_domain_us
Lennart Poettering wrote on 23/07/14 18:31:
> On Tue, 22.07.14 18:35, Colin Guthrie (gm...@colin.guthr.ie) wrote:
>
>>
>> 'Twas brillig, and Lennart Poettering at 22/07/14 12:10 did gyre and gimble:
> I guess it's OK to do this kind of user lookup stuff from the journal
> code (i.e. server
On 23/07/14 19:50, Zbigniew Jędrzejewski-Szmek wrote:
>> As a side effect this would actually even allow us to be closer to
>> FEdora's current bheaviour, since it reserves UIDs < 200 for static
>> assignment, which we could then easily exclude from theis logic, too.
> In practice this might not be
On 23/07/14 18:31, Lennart Poettering wrote:
> As a side effect this would actually even allow us to be closer to
> FEdora's current bheaviour, since it reserves UIDs < 200 for static
> assignment, which we could then easily exclude from theis logic, too.
Debian's uid/gid ranges for comparison, if
On Wed, Jul 23, 2014 at 07:31:31PM +0200, Lennart Poettering wrote:
[snip]
> Now, this alone wouldn't provide compatibility with the dreaded
> login.defs file. For that we'd then employ a postinst script that reads
> the range from the file, and then automatically generates a sysuers.d
> drop-in
On 23.07.2014 16:46, Marcel Holtmann wrote:
Hi Michael,
I think the lease should be remembered and reused in this case.
Hm, this sounds like a bug somewhere. When the new discover is sent
out it should send the same identifying information to the server, and
hence be given the same lease back
On Tue, 22.07.14 18:35, Colin Guthrie (gm...@colin.guthr.ie) wrote:
>
> 'Twas brillig, and Lennart Poettering at 22/07/14 12:10 did gyre and gimble:
> >> > I guess it's OK to do this kind of user lookup stuff from the journal
> >> > code (i.e. server_fix_perms())?
> > Hmm, yuck. Actually it is re
Signed-off-by: Djalal Harouni
---
connection.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/connection.c b/connection.c
index 85ffa5a..1658a92 100644
--- a/connection.c
+++ b/connection.c
@@ -1905,7 +1905,11 @@ int kdbus_conn_new(struct kdbus_ep *ep,
Update the policy test in order to register multiple policies
Signed-off-by: Djalal Harouni
---
test/test-kdbus-policy.c | 57 +---
1 file changed, 40 insertions(+), 17 deletions(-)
diff --git a/test/test-kdbus-policy.c b/test/test-kdbus-policy.c
inde
A policy holder should be able to upload multiple policies, so add the
test infrastructure for it.
Convert kdbus_hello_registrar() to allow an array of
'struct kdbus_policy_entry' and add the following helpers:
kdbus_policy_entries_size() to calculate the KDBUS_ITEM policies size
kdbus_policy_ma
Signed-off-by: Djalal Harouni
---
test/kdbus-util.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/test/kdbus-util.h b/test/kdbus-util.h
index 0fcfb72..39d7bb5 100644
--- a/test/kdbus-util.h
+++ b/test/kdbus-util.h
@@ -36,6 +36,12 @@ struct conn {
size_t size;
};
+struct kdb
Signed-off-by: Djalal Harouni
---
test/test-kdbus-policy.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/test/test-kdbus-policy.c b/test/test-kdbus-policy.c
index 6099087..de725e9 100644
--- a/test/test-kdbus-policy.c
+++ b/test/test-kdbus-policy.c
@@ -200,7 +200,7 @@ stat
This series adds the infrastructure to test and upload multiple
policies.
The last #5 patch allows to upload multiple policies per connection
The todo for the policy holders is:
* Should we set a maximum value for how many names/policies a policy
holder is allowed to upload. This is needed sin
On Wed, Jul 23, 2014 at 05:30:53PM +0200, Kay Sievers wrote:
> On Wed, Jul 23, 2014 at 5:17 PM, Zbigniew Jędrzejewski-Szmek
> wrote:
> > On Wed, Jul 23, 2014 at 04:55:59PM +0200, Kay Sievers wrote:
> >> On Wed, Jul 23, 2014 at 4:28 PM, Zbigniew Jędrzejewski-Szmek
> >> wrote:
> >>
> >> > Anyway, I
On Wed, Jul 23, 2014 at 5:17 PM, Zbigniew Jędrzejewski-Szmek
wrote:
> On Wed, Jul 23, 2014 at 04:55:59PM +0200, Kay Sievers wrote:
>> On Wed, Jul 23, 2014 at 4:28 PM, Zbigniew Jędrzejewski-Szmek
>> wrote:
>>
>> > Anyway, I think that /etc/login.defs support is made out to be something
>> > much m
On Wed, Jul 23, 2014 at 04:55:59PM +0200, Kay Sievers wrote:
> On Wed, Jul 23, 2014 at 4:28 PM, Zbigniew Jędrzejewski-Szmek
> wrote:
>
> > Anyway, I think that /etc/login.defs support is made out to be something
> > much more complicated than it really is. IMHO we should:
> >
> > - read /etc/logi
On Wed, Jul 23, 2014 at 4:28 PM, Zbigniew Jędrzejewski-Szmek
wrote:
> Anyway, I think that /etc/login.defs support is made out to be something
> much more complicated than it really is. IMHO we should:
>
> - read /etc/login.defs and fall back to the compiled in value
> - use whatever result we ge
On Wed, Jul 23, 2014 at 02:59:26PM +0200, Zbigniew Jędrzejewski-Szmek wrote:
> On Wed, Jul 23, 2014 at 02:57:10PM +0200, Zbigniew Jędrzejewski-Szmek wrote:
> > On Wed, Jul 23, 2014 at 12:40:06PM +0200, Karel Zak wrote:
> > > - all sections from input files are ignored
> > > - it's possible to wh
Hi Michael,
>>> I think the lease should be remembered and reused in this case.
>>
>> Hm, this sounds like a bug somewhere. When the new discover is sent
>> out it should send the same identifying information to the server, and
>> hence be given the same lease back again. Wireshark should tell yo
On Wed, Jul 23, 2014 at 11:29:20AM +0100, Colin Guthrie wrote:
> 'Twas brillig, and Colin Walters at 22/07/14 21:47 did gyre and gimble:
> > On Mon, Jul 21, 2014, at 09:43 AM, Lennart Poettering wrote:
> >>
> >> I am pretty strongly against this. Making this administrator
> >> configurable apepars
On Wed, Jul 23, 2014 at 02:57:10PM +0200, Zbigniew Jędrzejewski-Szmek wrote:
> On Wed, Jul 23, 2014 at 12:40:06PM +0200, Karel Zak wrote:
> > - all sections from input files are ignored
> > - it's possible to white-list wanted repeats by KNOWN_REPEATS[] in the
> > script
> > - the script is ba
On Wed, Jul 23, 2014 at 12:40:06PM +0200, Karel Zak wrote:
> - all sections from input files are ignored
> - it's possible to white-list wanted repeats by KNOWN_REPEATS[] in the script
> - the script is based on checkmans.sh from util-linux project
> - it's integrated to build-sys, just type "
On Wed, Jul 23, 2014 at 12:40:07PM +0200, Karel Zak wrote:
> ---
> man/coredump.conf.xml | 2 +-
> man/sd_bus_message_append_array.xml | 2 +-
> man/systemctl.xml | 2 +-
> man/systemd-journal-remote.xml | 2 +-
> man/systemd.journal-fields.xml | 2 +-
> m
On Wed, Jul 23, 2014 at 12:47:37PM +0200, Tom Gundersen wrote:
> On Wed, Jul 23, 2014 at 9:50 AM, Michael Olbrich
> wrote:
> > I've been experimenting with systemd-networkd to see where it fits my
> > use-cases. I'm looking for some insight if the issues I'm seeing are bugs,
> > features just not
On Wed, Jul 23, 2014 at 11:13:50AM +0300, Suvendu Mitra wrote:
> Thanks now it works, But does it mandatory to start slapd on same port as
> "ListenStream=" of socket file of systemd-socket-proxyd. e.g in following
> example port 400.
Maybe the protocol embeds the port number in the stream? That wo
On Wed, Jul 23, 2014 at 10:02:57AM +0200, Daniel Buch wrote:
> Its false positive but lets make gcc happy
We have approximately a million of those... If you compile with -O2 or -O3 they
really multiply. I filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61846,
so let's wait for the upstream respo
On Wed, Jul 23, 2014 at 1:49 PM, Colin Guthrie wrote:
> Kay Sievers wrote on 23/07/14 12:36:
>> I don't see the rather artificially constructed case of an
>> /usr/share/factory/etc/login.defs + tmpfiles snippet to copy to /etc
>> as a valid argument for reading login.defs.
>
> Well, my point was t
Kay Sievers wrote on 23/07/14 12:36:
> I don't see the rather artificially constructed case of an
> /usr/share/factory/etc/login.defs + tmpfiles snippet to copy to /etc
> as a valid argument for reading login.defs.
Well, my point was that one of Lennart's original arguments for NOT
reading login.d
On Wed, Jul 23, 2014 at 1:11 PM, Colin Guthrie wrote:
> 'Twas brillig, and Colin Guthrie at 23/07/14 11:29 did gyre and gimble:
>> If there was a /usr/share/factory/etc/login.defs with e.g. 500 boundary
>> point, then this file would presumably be copied in by tmpfiles to
>> populate /etc/login.de
'Twas brillig, and Colin Guthrie at 23/07/14 11:29 did gyre and gimble:
> If there was a /usr/share/factory/etc/login.defs with e.g. 500 boundary
> point, then this file would presumably be copied in by tmpfiles to
> populate /etc/login.defs
Of course one thing that makes this argument slightly in
Due to recent changes where $network "maps" to network-online.target
it is not guaranteed that initscript which provides networking will
be terminated after network.target during shutdown which is against LSB.
---
src/sysv-generator/sysv-generator.c | 5 +
1 file changed, 5 insertions(+)
diff
Am 22.07.2014 22:47, schrieb Colin Walters:
> On Mon, Jul 21, 2014, at 09:43 AM, Lennart Poettering wrote:
>>
>> I am pretty strongly against this. Making this administrator
>> configurable apepars very wrong, this really should be a decision for
>> the distribution vendor, and that's it.
>
> You
Am 23.07.2014 12:47, schrieb Tom Gundersen:
>> I think the lease should be remembered and reused in this case.
> In general, saving the lease to disk is probably not a good idea. We
> would need to store it on /var, and we may need to start the DHCP
> server before /var has been mounted. To the ex
On Wed, Jul 23, 2014 at 9:50 AM, Michael Olbrich
wrote:
> I've been experimenting with systemd-networkd to see where it fits my
> use-cases. I'm looking for some insight if the issues I'm seeing are bugs,
> features just not implemented yet or if my use-case is out of scope for
> networkd.
> The m
- all sections from input files are ignored
- it's possible to white-list wanted repeats by KNOWN_REPEATS[] in the script
- the script is based on checkmans.sh from util-linux project
- it's integrated to build-sys, just type "make check-repwords", for example:
$ make check-repwords
GEN
Not sure if the script from the first patch is wanted, but at least
the second patch that fix typos in man/*.xml files should be applied.
[PATCH 1/2] tools: add script to detect repeating words in docs
[PATCH 2/2] docs: remove repeating words from man/*xml
Karel
__
---
man/coredump.conf.xml | 2 +-
man/sd_bus_message_append_array.xml | 2 +-
man/systemctl.xml | 2 +-
man/systemd-journal-remote.xml | 2 +-
man/systemd.journal-fields.xml | 2 +-
man/sysusers.d.xml | 2 +-
6 files changed, 6 insertions(
'Twas brillig, and Colin Walters at 22/07/14 21:47 did gyre and gimble:
> On Mon, Jul 21, 2014, at 09:43 AM, Lennart Poettering wrote:
>>
>> I am pretty strongly against this. Making this administrator
>> configurable apepars very wrong, this really should be a decision for
>> the distribution vend
On Tue, 22.07.14 12:35, Thomas Blume (thomas.bl...@suse.com) wrote:
> If so, we could record a previous lid open event e.g. in a status file.
> We could then inhibit the suspend if there was no previous lid open event or
> allow it without timeout, if there was one.
Not following here... Note th
Thanks now it works, But does it mandatory to start slapd on same port as
"ListenStream=" of socket file of systemd-socket-proxyd. e.g in following
example port 400.
# cat proxy-to-directory-400.service
[Unit]
Requires=master-ldap-400.service
After=master-ldap-400.service
[Service]
ExecStart=/usr
Its false positive but lets make gcc happy
---
src/journal/coredump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/journal/coredump.c b/src/journal/coredump.c
index 182c2b1..a361a51 100644
--- a/src/journal/coredump.c
+++ b/src/journal/coredump.c
@@ -700,7 +700,7 @@ log:
Ralf Jung ralfj.de> writes:
> Essentially, I want a proper mount with the usual RequiredBy and
> WantedBy - but without the Before that makes others wait on this disk.
> So, the concurrency part of automount is exactly what I want, but
> without the on-demand part. Is that possible?
You're looki
Hi,
I've been experimenting with systemd-networkd to see where it fits my
use-cases. I'm looking for some insight if the issues I'm seeing are bugs,
features just not implemented yet or if my use-case is out of scope for
networkd.
The most common use-case I have is rather simple: One ethernet inte
Good catch. Applied.
Thanks.
Tom
On Wed, Jul 23, 2014 at 12:18 AM, Dan Williams wrote:
> Probably a left-over from when router solicitations were
> requested in the DHCP6 code. But since they are now separate,
> this state is no longer needed.
>
> Signed-off-by: Dan Williams
> ---
> src/lib
On Tue, Jul 22, 2014 at 11:54 PM, Dan Williams wrote:
> All routes added by networkd are currently set RTPROT_BOOT, which according
> to the kernel means "Route installed during boot" (rtnetlink.h). But this
> is not always the case as networkd changes routing after boot too. Since
> the kernel
52 matches
Mail list logo