FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Hardened

 
 
LinkBack Thread Tools
 
Old 02-17-2012, 02:01 PM
Martin Gracik
 
Default Check if the volume id is not longer than 32 chars (#786832)

----- Original Message -----
> > diff --git a/src/pylorax/treebuilder.py
> > b/src/pylorax/treebuilder.py
> > index f2511b0..6ed68fe 100644
> > --- a/src/pylorax/treebuilder.py
> > +++ b/src/pylorax/treebuilder.py
> > @@ -23,6 +23,7 @@ logger = logging.getLogger("pylorax.treebuilder")
> > import os, re
> > from os.path import basename, isdir
> > from subprocess import check_call, check_output
> > +import sys
> >
> > from sysutils import joinpaths, remove
> > from shutil import copytree, copy2
> > @@ -155,6 +156,9 @@ class TreeBuilder(object):
> > # NOTE: if you change isolabel, you need to change pungi
> > to match, or
> > # the pungi images won't boot.
> > isolabel = volid or "{0.name} {0.version}
> > {1.basearch}".format(product, arch)
> > + if len(isolabel) > 32:
> > + logger.fatal("the volume id cannot be longer than 32
> > characters")
> > + sys.exit(1)
> >
> > # NOTE: if you pass an arg named "runtime" to a mako
> > template it'll
> > # clobber some mako internal variables - hence
> > "runtime_img".
>
> Have you started to do anything at this point? If so, it'd be nicer
> to
> check the length way up front, right at argument processing time.

good point, there's already stuff happening before this, I will move the check somewhere where it is run earlier

>
> - Chris
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list
>

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 07:30 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org