[lxc-devel] [PATCH] Mounting of filesystems from fstab file

2011-01-16 Thread Joerg Gollnick
Dear all,
while setting up a container on x86_64 (archlinux host/guest) I had trouble 
with mounting dev/pts and others from container.fstab and a ssh login does not 
work (only ssh container bash -i gives you a shell)
The cause is that conf.c does not initialize mntflags.
Best regards Joerg


--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -880,7 +880,8 @@ static int parse_mntopts(const char *mntopts, unsigned 
long *mntflags,
char *s, *data;
char *p, *saveptr = NULL;
 
-   *mntdata = NULL;
+   *mntdata  = NULL;
+*mntflags = 0UL;
 
if (!mntopts)
return 0;

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel


[lxc-devel] [GIT] lxc branch, master, updated. 91656ce587b99ae193e5de7e12ec9d9a5a78caa0

2011-01-16 Thread Daniel Lezcano
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "lxc".

The branch, master has been updated
   via  91656ce587b99ae193e5de7e12ec9d9a5a78caa0 (commit)
   via  2175f8936cc7c1e8cc451da040aa57d5dd6ad088 (commit)
  from  e46595367719fc0a5a2e4c87f434cde9b00b46e5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit 91656ce587b99ae193e5de7e12ec9d9a5a78caa0
Author: Joerg Gollnick 
Date:   Sun Jan 16 19:40:46 2011 +0100

Fix mntflags initialization

Dear all,
while setting up a container on x86_64 (archlinux host/guest) I had trouble
with mounting dev/pts and others from container.fstab and a ssh login does 
not
work (only ssh container bash -i gives you a shell)
The cause is that conf.c does not initialize mntflags.

Signed-off-by: Daniel Lezcano 

commit 2175f8936cc7c1e8cc451da040aa57d5dd6ad088
Author: Daniel Lezcano 
Date:   Fri Jan 14 09:51:13 2011 +0100

add lxc-lenny template

Signed-off-by: Daniel Lezcano 

---

Summary of changes:
 src/lxc/conf.c |1 +
 templates/lxc-lenny.in |4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
lxc

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel


Re: [lxc-devel] [PATCH] Mounting of filesystems from fstab file

2011-01-16 Thread Daniel Lezcano
On 01/16/2011 07:00 PM, Joerg Gollnick wrote:
> Dear all,
> while setting up a container on x86_64 (archlinux host/guest) I had trouble
> with mounting dev/pts and others from container.fstab and a ssh login does not
> work (only ssh container bash -i gives you a shell)
> The cause is that conf.c does not initialize mntflags.
> Best regards Joerg
>
>
> --- a/src/lxc/conf.c
> +++ b/src/lxc/conf.c
> @@ -880,7 +880,8 @@ static int parse_mntopts(const char *mntopts, unsigned
> long *mntflags,
>  char *s, *data;
>  char *p, *saveptr = NULL;
>
> -   *mntdata = NULL;
> +   *mntdata  = NULL;
> +*mntflags = 0UL;
>
>  if (!mntopts)
>  return 0;

Good catch, Thanks !

Applied.

   -- Daniel

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel


[lxc-devel] [PATCH] Only bring up network interface if IFF_UP is set

2011-01-16 Thread David Ward
Each network interface was brought up regardless of the configuration,
as the wrong boolean operator was being used to test the IFF_UP flag.

Signed-off-by: David Ward 
---
 src/lxc/conf.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 2f66e76..a0c5fee 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -1217,7 +1217,7 @@ static int setup_netdev(struct lxc_netdev *netdev)
 
/* empty network namespace */
if (!netdev->ifindex) {
-   if (netdev->flags | IFF_UP) {
+   if (netdev->flags & IFF_UP) {
err = lxc_device_up("lo");
if (err) {
ERROR("failed to set the loopback up : %s",
@@ -1281,7 +1281,7 @@ static int setup_netdev(struct lxc_netdev *netdev)
}
 
/* set the network device up */
-   if (netdev->flags | IFF_UP) {
+   if (netdev->flags & IFF_UP) {
int err;
 
err = lxc_device_up(current_ifname);
-- 
1.7.1


--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel