Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account
List archives

Is it safe to both import and inherit from a class?

Definitions in External Nodes
(19 lines)
auth failure under unicorn with 2.6.1rc2
(27 lines)
Aug 26, 2010
Rob McBroom
Rob McBroom
I have some classes that inherit from others. For instance, the
ldapconsumer and ldapprovider classes inherit from the ldap class.

On an external node, I might have both ldap and ldapconsumer classes, so
the ldap class is being "invoked" directly, but also by the fact that
ldapconsumer is inheriting from it.

This seems to be working fine (in 0.25.5), but I wonder if that's by
design or by accident. Can I count on this behavior going forward?

If you're wondering why I would have the classes defined like that, it's
to make things easier on humans. For instance, it's much easier to find all
LDAP servers by searching for `class=ldap` than
`(|(class=ldapconsumer)(class=ldapprovider))`.



The magnitude of a problem does not affect its ownership.





Reply
Tags: classesldapldapconsumerinheritdirectly
Messages in this thread
Is it safe to both import and inherit from a class?
Similar Threads
PATCH/puppet 1/1] Minimal fix for #4243 -- import isn't thread safe
The import function was calling type_loader#import directly so that it
could
pass in the current file name, but by doing so it was thwarting the
thread-
safety locking level.  This patch rearanges things so that all imports go
through the same (thread safe) code path while retaining the current_file
passing, error handling, etc. from the old structure.

Signed-off-by: Markus Roberts <Mar### @reality.com>
---
 lib/puppet/parser/parser_support.rb  |    2 +-
 lib/puppet/parser/type_loader.rb     |   28 +++++++++++++
disable same name sibling for custom node type inherit from nt:folder
Hi,

I want have a custom node type

[mix:accessControlled] mixin
 - cms:authUsersRead (string) multiple 
 - cms:authUsersWrite (string) multiple 
 - cms:authGroupsRead (string) multiple 
 - cms:authGroupsWrite (string) multiple 
 - cms:authRolesRead (string) multiple 
 - cms:authRolesWrite (string) multiple 

[cms:folder] > nt:folder, mix:referenceable, mix:lockable,
mix:accessControlled
 - cms:author (string)
 - cms:name (string)
 - cms:description (string) 

I know nt:folder allow same name siblings, and I want to disable same name
sibling for cms:folder,
Is there any way to disable same name sibling for cms:folder if i want to
inherit it from nt:folder?

Best Regards,
Edward


Created: (FELIX-2477) [gogo] shell procedural commands don't inherit closure arguments
[gogo] shell procedural commands don't inherit closure arguments

JAXB only converting the base class not the derived class
We have implemented RESTFul service using Apache CXF. Used JSON as the
communication between our GWT client and RESTFul server.

Our DTOs are having structure Similar to below. Every DTO should extend
BaseDTO.

@XmlRootElement(name = "BaseDTO")
public class BaseDTO implements Serializable {

    private String UUID;
    public String getUUID() {
        return UUID;
    }
    public void setUUID(String UUID) {
        this.UUID = UUID;
    }
}

@XmlRootElement(name = "Agent")
public class Agent extends BaseDTO {

    private String description;
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
}

We have configured JSONProvider in spring-config.xml as below

   <jaxrs:server id="restServer" address="/services/">
        <jaxrs:serviceBeans>
            <ref bean="agentService"/>
        </jaxrs:serviceBeans>
        <jaxrs:extensionMappings>
            <entry key="feed" value="application/atom+xml"/>
            <entry key="json" value="application/json"/>
            <entry key="xml" value="application/xml"/>
            <entry key="html" value="text/html"/>
        </jaxrs:extensionMappings>
        
        <jaxrs:providers>
            <bean
class="org.apache.cxf.jaxrs.provider.JSONProvider">
                <property name="writeXsiType" value="false" />
                <property name="readXsiType" value="false" />
                <property name="jaxbElementClassMap" value="" />
            </bean>
        </jaxrs:providers>
    </jaxrs:server>


Methods from AgentService.java returns List<Agent> and we put this
in a
common response format defined below and constructs response using
Response
(javax.ws.rs.core.Response.ok(UIServiceResponse<T>)).

@XmlRootElement(name = "UIServiceResponse")
public class UIServiceResponse<T> {

    private UIException exception;
    private List<T> result;

    public UIException getException() {
        return exception;
    }
    public void setException(UIException exception) {
        this.exception = exception;
    }
    public List<T> getResult() {
        return result;
    }
    public void setResult(List<T> result) {
        this.result = result;
    }
}


The problem is, everything works fine if we include
@XmlSeeAlso({Agent.class}) to UIServiceResponse. But when we remove we are
asked to provide information about the return classes.

This UIServiceResponse is used from multiple projects and having
@XmlSeeAlso
included for every DTO we create is difficult and not a good approach.

Is there any approach that works without using @XmlSeeAlso and gets
derived
class data to client? Any help is really appreciated.

Hope I did not confuse :)
Thank you



Re: Safe way to backup an RDB file
Can an AOF file be backed up with a simple 'cp' command? Or must we
create a dump file to do a backup?

Thanks,
David

On Jul 27, 3:39 pm, Salvatore Sanfilippo <ant### @gmail.com> wrote:
 On Tue, Jul 27, 2010 at 9:31 AM, teleo <lev.### @gmail.com>
wrote:
 > What is the safest way to backup an RDB file in Redis?

 In Redis .rdb files can be copied while the server is running without
 any need of lock. No corruption is possible since the new file is
 always saved in a temp location and atomically rename(2)d to the new
 location.

 So just use "cp" :)

 Cheers,
 Salvatore

 > Thanks,
 > T

 > --
 > 
Is it safe to replace master.db file?
Hi,

I am using ApacheDs 1.5.4, after running successfully for a long time, now
getting the following error:

Exception in thread "main" java.lang.NullPointerException
        at
org.apache.directory.server.core.entry.ClonedServerEntry.<init>
        (ClonedServerEntry.java:67)
        at

org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition.lookup
(JdbmPartition.java:457)
        at

org.apache.directory.server.core.partition.impl.btree.ServerEntryCursorAdaptor.get
(ServerEntryCursorAdaptor.java:140)
        at

org.apache.directory.server.core.partition.impl.btree.ServerEntryCursorAdaptor.get
(ServerEntryCursorAdaptor.java:40)
        at

org.apache.directory.server.core.filtering.BaseEntryFilteringCursor.next
(BaseEntryFilteringCursor.java:502)
        at org.apache.directory.server.core.authz.GroupCache.initialize
        (GroupCache.java:151)
        at org.apache.directory.server.core.authz.GroupCache.<init>
        (GroupCache.java:115)
        at

org.apache.directory.server.core.authz.AciAuthorizationInterceptor.init
(AciAuthorizationInterceptor.java:211)
        at

org.apache.directory.server.core.interceptor.InterceptorChain.register0
(InterceptorChain.java:439)
        at

org.apache.directory.server.core.interceptor.InterceptorChain.register
(InterceptorChain.java:395)
        at
        org.apache.directory.server.core.interceptor.InterceptorChain.init
        (InterceptorChain.java:255)
        at
       
org.apache.directory.server.core.DefaultDirectoryService.initialize
        (DefaultDirectoryService.java:1385)
        at
org.apache.directory.server.core.DefaultDirectoryService.startup
        (DefaultDirectoryService.java:840)
        at org.apache.directory.server.configuration.ApacheDS.startup
        (ApacheDS.java:126)
        at org.apache.directory.server.Service.init(Service.java:86)
        at org.apache.directory.server.UberjarMain.main
        (UberjarMain.java:56)



safe to use --replSet and --master at the same time?
I am going to move towards using replica sets, but don't want to go
all at once.  Can I still use some regular slaves on a replica set
master?  Should I set --replSet and --master on the command line?





Do implementations of Watcher need to be thread-safe?
Hi,

Do implementations of Watcher need to be thread-safe, or can I assume
that process(...) will always be called by the same thread?

Thanks,
Josh "Ua" Ball


Re: Is it safe to replace master.db file?
OK thanks for the reply.  I have a partition and all my entries are under
that partition.  What I replaced was the master.db from in system folder
not
in my partition folder so will it affect?




DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

--- Comment #10 from Yair Lenga <yair.l### @citi.com> 2010-07-13
17:54:53 EDT ---
Mark,

Thanks for taking the change. I'll follow you suggestions regarding svn
diff
for the next time.

Do I have to submit anything for the change to flow to 7.X ?

Yair




DO NOT REPLY New: SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=49520

           Summary: SSI Servlet should support safe configuration
           Product: Tomcat 7
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Catalina
        AssignedTo: de### @tomcat.apache.org
        ReportedBy: yair.### @citi.com


This is a duplicate request from the Tomcat 6 (Bug 48960). See proposed
solution/discussion:
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

The current configuration of the SSI module is "All" or "None". The "ALL"
option will expose all the legacy Apache SSI directive (echo, printenv,
if,
exec, ...). As documented, allowing SSI will allow execution of arbitrary
programs using the "exec". As a result, there is no safe way to expose
sites/projects containing SSI directive, without taking a security risk,
or
reviewing of every file.

The "exec" directive, with the cmd option is a major risk. Even for
Apache, you
have the option to allowing the "safe" include (includeNoExec). The
includeNoExec allow pages to be served, even when the content is not
reviewed,
or when users are allowed to upload content to the site.

I have a big site which need to be converted into JSP. I would like to use
the
SSI servlet to allow for transition over time. The extra risk from ( from
exec
cmd) make it impossible to deploy the SSI.

My request: Modify the configuration of SSI as follow: By default, it will
only
allow "safe" directive (no exec cmd=...). This will eliminate the risk
from
arbitrary execution of commands ("del *.*"). It will also remove many
potentail
load problems. The cmd= should only be allowed using a directive like
"allowUnsafeExec", which will default to false.

I think that the change will make it easier to use the SSI feature,
without
exposing the server to big risk. The risk associated with the "safer"
version
of SSI is similar to the risk from running JSP pages.

A better alternative is to eliminate the "exec cmd=" option alltogether.




difference between safe and sync options in PHP Driver
Hi,

Can anyone make me clear on following questions?

http://us3.php.net/manual/en/mongocollection.remove.php
http://us3.php.net/manual/en/mongocollection.insert.php
http://us3.php.net/manual/en/mongocollection.update.php

So does that mean safe and sync option variables when used as boolean
type are same And they are different only when fsync is used as an
integer?

And if I apply fsync, will that apply to slaves / other replica sets
also?

Thanks!





DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

--- Comment #9 from Mark Thomas <mar### @apache.org> 2010-07-13
17:38:55 EDT ---
In the end I used the patch a guide and write a new one. Some additional
comments:
- if you do an svn diff against a normal source tree patches usually apply
cleanly
- new features should be documented

The patch has been applied to truck and proposed for 6.0.x




DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

--- Comment #8 from Mark Thomas <mar### @apache.org> 2010-07-13
17:16:40 EDT ---
The diff is inverted and the patch is using tabs rather than spaces. I
should
eb able to work with that but you might need to fix it.




DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

--- Comment #4 from Mark Thomas <ma### @apache.org> 2010-06-29
12:45:54 EDT ---
*** Bug 49520 has been marked as a duplicate of this bug. ***




DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

--- Comment #7 from Yair Lenga <yair.### @citi.com> 2010-07-13
15:52:28 EDT ---
Created an attachment (id=25760)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25760)
Patch to disable exec by default, new allowExec tag

Patch for three files, created against 6.0.26-src




DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

--- Comment #6 from Mark Thomas <mar### @apache.org> 2010-07-09
10:17:16 EDT ---
Providing patches in diff -u format would help.




Is it safe to use timestamps (or versions) to load old values.
Hi all,

I use automatic unconditional data load from other sources into my
database. But data, already loaded, can be changed by users
(or updated by MR jobs, f.e. some foreign keys resolutions or text
cleanup).
My loaders can load same data once more (with old data) and possibly
override changes, made to stored data. I can't allow this.

Not long ago I asked subj on iirc, and answer was: it is
not safe to put old data (with old timestamps).

Now I use versioned qualifiers and store version in them. But this
is very hard to support and it is hard to use such implementation
with other tools (like hive or pig), it is hard to use with filters (i
should
use custom very specific filters), it is no support for ttl or num of
versions
in scan.

So, i want to ask againt. What is a best strategy in such situtaion.
I need to put old data and don't override if it exists. I don't want
place version
in key (it is the same complexity as in qualifiers).
My be here some plans to support such situation in 0.89?

It looks, that i can use solution with old timestamps, but it leads to
incorrect
answers (this new data from memstore) until hbase compact table.

PS:
to be more specific, here is example of my schema (sql like notation):

table bsn.main(
long pk

Thanks for any advise.
Andrey.


DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

--- Comment #5 from Yair Lenga <yair.l### @citi.com> 2010-07-09
10:01:32 EDT ---
(In reply to comment #4)
 *** Bug 49520 has been marked as a duplicate of this bug. ***

Mark,

Is there anything I can do to speed up the inclusion of this change ? I've
noticed it did not make it for 6.0.28, where few other CGI/SSI related
changed
were incorporated. I would love to use the SSI, but I can not use it
because of
the security reisk of the "unsafe" include/exec.




DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

Mark Thomas <ma### @apache.org> changed:

           What    |Removed                     |Added