[sr-dev] [ openser-Feature Requests-1891148 ] protection of open fifo/ socket files against removing

SourceForge.net noreply at sourceforge.net
Mon Oct 22 11:48:24 CEST 2012


Feature Requests item #1891148, was opened at 2008-02-11 05:58
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743023&aid=1891148&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Helmut Kuper (hekuper)
Assigned to: Nobody/Anonymous (nobody)
Summary: protection of open fifo/ socket files against removing

Initial Comment:
Hi,

I found that starting a 2nd openser with same config as an already
running openser on same machine using module mi_datagram leads to a deletion of the
socket file of the already running openser process.

This is very bad when u use openser as a frontend for sems for example.  :( 

If this is a bug, maybe the check, whether there is
an already running openser using same network resources, should be placed *befor* starting modules. 
Alternative modules should be able to handle those problematic scenarios ...

My mi_datagram config is this:

loadmodule "mi_datagram.so"
modparam("mi_datagram", "socket_name", "/tmp/openser_ansagen_sock")
modparam("mi_datagram", "children_count", 1)
modparam("mi_datagram", "unix_socket_mode", 0660)
modparam("mi_datagram", "unix_socket_group", "voip")
modparam("mi_datagram", "unix_socket_user", "ruth")
modparam("mi_datagram", "socket_timeout", 2000)

regards
Helmut

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2012-10-22 02:48

Message:
Hi there! This is my first visit to your blog! We are a team of volunteers
and starting a new project in a community in the same niche. Your blog
provided us useful information to work on. You have done a marvellous job!
 <a
href="http://thenorthfacebackpacksf.blogspot.com/2012/10/cheap-north-face-jackets-aglow.html"
title="north face jackets clearance">north face jackets clearance</a>

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2012-10-15 09:23

Message:
Today, I went to the beachfront with my children. I found a sea shell and
gave it to my 4 year old daughter and said "You can hear the ocean if you
put this to your ear." She placed the shell to her ear and screamed. There
was a hermit crab inside and it pinched her ear. She never wants to go
back! LoL I know this is totally off topic but I had to tell someone!
[url=http://northfacevest.blogbaker.com/]Parry[/url]
 <a href="http://northfacevest.blogbaker.com/" title="Parry">Parry</a>

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2012-08-26 01:24

Message:
Hey there this is kind of of off topic but I was wondering if blogs use
WYSIWYG editors or if you have to manually code with HTML. I'm starting a
blog soon but have no coding expertise so I wanted to get advice from
someone with experience. Any help would be enormously appreciated!
http://www.sunglasses4summer.net/

----------------------------------------------------------------------

Comment By: Henning Westerholt (henningw)
Date: 2008-07-08 06:47

Message:
Logged In: YES 
user_id=337916
Originator: NO

Hi all,

the problem with checking the existence of the fifo/ socket is that the old
file is not deleted during the shutdown. Even if we change this then the
problem would be still present in the event of a server crash.

As Helmut aggreed that this can be closed, i've moved this to the feature
request section. The startup code in main.c could be modified to check for
available network resources before doing the module initialization to
achieve this functionality.

Cheers,

Henning

----------------------------------------------------------------------

Comment By: Ovidiu Sas (osas)
Date: 2008-02-12 07:58

Message:
Logged In: YES 
user_id=1395524
Originator: NO

It happened to me too.  I wanted to check the version of openser and
instead of running 'openser -V' I ran 'openser -v' and my fifo file was
gone.
Maybe a quick fix would be to check the existence of the fifo file.  If
exists, exit with an error, if not, proceed as normal.
Just my 2c.


Regards,
Ovidiu sas

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2008-02-12 07:53

Message:
Logged In: NO 

Hi,

well, I agree too. This is an operation error by admin. But it is annoying
that it is so easy to destroy the media server. This will quit often occurs
if you are using bash shell with command history combined with nervous
fingers  ;) ...

I think that checking network resources in openser befor doing rest of
configuration is safer. It should work allways, cause no second openser
will user same address and port on same machine at same time.

On the other Hand saving the PID of first openser in a PID should be an
acceptable work around.

So we can close this case if you want.

regards
Helmut
 

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2008-02-12 07:40

Message:
Logged In: NO 

is it possible to delete a FIFO which is currently used? E.g by mistake I
start openser a second time. If it deletes the FIFO then it may cause
problems to the current running openser instance.

klaus

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-02-12 05:33

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Henning,

I agree here - the fix should not be in openser, but rather in whatever
scripts/admins are managing openser. From my point of view, this is a
openser operation error.

Regards,
Bogdan

----------------------------------------------------------------------

Comment By: Henning Westerholt (henningw)
Date: 2008-02-12 03:24

Message:
Logged In: YES 
user_id=337916
Originator: NO

I think this can be fixed by other means:

Just add some checks to openserctl to not start openser two times, like the
init script does (i think). 
This would be easier than to fix the OpenSER start process to not start at
all (or fail just in the beginning) if another process is already running.

Henning

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-02-12 03:06

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Helmut,

This is the normal/expected bahviour of the module - to avoid any security
problems (using a fake or malicious already existing unixsocket) openser
removes it first (if exists) and then creates its own with proper
permissions and security restrictions.

So, it is not a bug :).

Regards,
Bogdan

----------------------------------------------------------------------

Comment By: Helmut Kuper (hekuper)
Date: 2008-02-11 06:53

Message:
Logged In: YES 
user_id=1851349
Originator: YES

Hi Bogdan,

yes I use same socket file name for both opensers, cause both are using
same config file.

Befor we misunderstand: I don't want to run 2 opensers with same config on
same machine!! I rather strumbled about that bug/problem, when I accidently
started same openser without openserctl twice 

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-02-11 06:45

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Helmut,

so you use the same socket_name for both openser's ??

Regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743023&aid=1891148&group_id=139143



More information about the sr-dev mailing list