Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Rdb's impact on $persona_delete ss$_personadelpend
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 2nd June 19:20
richard maher
External User
 
Posts: 1
Default Rdb's impact on $persona_delete ss$_personadelpend



Hi,

Back in November 2001 (Doesn't time fly . . .) I had a problem with trying
to delete a persona after accessing Rdb. In a nutshell, If you'd started a
read-only transaction for a persona then you were unable to delete it and
were returned ss$_personadelpend even though you'd committed the txn and
gone back to your natural persona. Scary thing, from a VMS point of view,
was you were able to assume a dead persona. (Though I was more interested in
the potential memory-leak/resource exhaustion of endless personae being
created)

At the time I had no idea if it was a VMS or Rdb problem, I was running
Alpha VMS 7.2 and Rdb 7.0.3 and no one (least of all Rdb engineering) was
interested in discussing the issue. Anyway, I was testing some new features
the other day and I decided to revisit this functionality and guess what?
It's fixed! I'm now running Rdb 7.1-24 and if I rdb$setver back to 7.0 I can
reproduce the problem. So it is clearly something Rdb was doing that
prevented the persona from dying. But what? I scanned through the Rdb
release notes and could not find anything. Surely this is a lot more
interesting then most of the crap that gets beaten to death in COV?

Most of you may not find this exciting, but for me, this is the dog's
bollocks! If only Rdb supported Set Session Authorization Persona
:ws_integer; :-(

Norm, you've been very quite lately; any interest in this? What about you
VMS guys? What could Rdb have been doing that stopped the persona from dying
immediately? I checked SDA> Show Proc/Persona but it had already gone after
the reserve. I was hoping that RefCount might reveal something.

Anyway, I'll attach some test code as a reply along with the original mail.
This really is pretty shit-hot stuff! Maybe if someone else asks for it we
may get a reply?

Regards Richard Maher

PS. On second thoughts let's resume normal programming - "This persona stuff
could reveal a deep-rooted underlying lack of commitment to VMS!", "I smell
smoke; is that a vibration?", "We're all going to die!!!"
  Reply With Quote


  sponsored links


2 2nd June 19:20
richard maher
External User
 
Posts: 1
Default Rdb's impact on $persona_delete ss$_personadelpend



Here's the test code : -

$!Author:&Richard&Maher&-&TIER3&Software&Ltd
$!
$on&warning&then&exit
$if&.not.&f$privilege("cmkrnl,impersonate,tmpmbx") &then&goto&no_priv
$if&f$getsyi("arch_name")&.nes.&"Alpha"&then&goto& no_vax
$!
$create&t.mar

&&&&&&&&.TITLE&External&symbol&definitions

&&&&&&&&$ISSDEF&&&&&&&&&&&&&&&&&GLOBAL

&&&&&&&&.END

$macrox/lis&t
$!
$create&t1.cob
identification&division.
program-id.&&&&iss_disp&with&ident&"v2.1".

author.&&&&&&&&Tier3&Software&Ltd.

environment&division.
input-output&section.
file-control.

&&&&&&&&select&&uaf&assign&sysuaf.

data&division.
file&section.

fd&&uaf
&&&&record&varying&depending&on&uaf_rec_len.
01&&uaf_rec&&&&&&&&&&&&&&&&&pic&x(32765).

01&&username_rec.
&&&&03&&&&&&&&&&&&&&&&&&&&&&pic&x(4).
&&&&03&&uaf_username&&&&&&&&pic&x(12).

working-storage&section.
*
01&&child_exit_ast&&&&&&&&&&&&&&&&&&&&&&pointer&va lue&&&external&child_exit_
ast.
01&&iss$m_create_authpriv&&&pic&9(9)&&&&comp&&&&va lue&&&external&iss$m_creat
e_authpriv.
01&&cli$m_nowait&&&&&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&cli$m_nowai
t.
01&&io$_readvblk&&&&&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&io$_readvbl
k.
01&&io$_writevblk&&&&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&io$_writevb
lk.
01&&io$_writeof&&&&&&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&io$_writeof
..
01&&rms$_rnf&&&&&&&&&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&rms$_rnf.
01&&ss$_nomoreproc&&&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&ss$_nomorep
roc.
01&&ss$_userdisabled&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&ss$_userdis
abled.
01&&ss$_endoffile&&&&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&ss$_endoffi
le.
01&&ss$_normal&&&&&&&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&pic&9(9)&&&&comp.
*
01&&child_params.
&&&&03&&child_status&&&&&&&&pic&9(9)&&&&comp.
&&&&03&&user_exit&&&&&&&&&&&pic&x&&&&&&&&&&&&&&&va lue&&&"N".
01&&child_pid&&&&&&&&&&&&&&&pic&9(9)&&&&comp.
01&&mbx_chan&&&&&&&&&&&&&&&&pic&9(4)&&&&comp.
*
01&&letter_sent.
&&&&03&&new_name&&&&&&&&&&&&pic&x(12).
&&&&03&&new_password&&&&&&&&pic&x(31).
&&&&03&&&&&&&&&&&&&&&&&&&&&&pic&x(469).
01&&letter_recv.
&&&&03&&reserved_persona&&&&pic&9(9)&&&&comp.
&&&&03&&&&&&&&&&&&&&&&&&&&&&pic&x(508).
*
01&&iosb.
&&&&03&&cond_val&&&&&&&&&&&&pic&9(4)&&&&comp.
&&&&03&&byte_count&&&&&&&&&&pic&9(4)&&&&comp.
&&&&03&&chan_info&&&&&&&&&&&pic&9(9)&&&&comp.
*
01&&uaf_rec_len&&&&&&&&&&&&&pic&9(9)&&&&comp.
01&&eof_uaf&&&&&&&&&&&&&&&&&pic&x&&&&&&&&&&&&&&&va lue&&&"N".
01&&user_cnt&&&&&&&&&&&&&&&&pic&9(9)&&&&comp.
*
01&&scratch_lw&&&&&&&&&&&&&&pic&9(9)&&&&comp.
01&&username_len&&&&&&&&&&&&pic&9(4)&&&&comp.
01&&work_persona&&&&&&&&&&&&pic&9(9)&&&&comp.
01&&find_list.
&&&&03&&item_username.
&&&&&&&&05&&new_name_len&&&&pic&9(4)&&&&comp.
&&&&&&&&05&&&&&&&&&&&&&&&&&&pic&9(4)&&&&comp&&&&va lue&&&external&iss$_userna
me.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&va lue&&&reference&new_name.
&&&&&&&&05&&&&&&&&&&&&&&&&&&pic&9(9)&&&&comp.
&&&&03&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&comp.
*
procedure&division.
declaratives.
uaf_problems&section.
&&&&use&after&standard&error&procedure&on&uaf.
00.
&&&&call&"lib$stop"&using&by&value&rms-sts&of&uaf.
*
end&declaratives.
kick_off&section.
00.
&&&&perform&parent_init.

&&&&display&"Enter&new&username&&:&"&no&advancing.
&&&&accept&&&&&&new_name
&&&&&&&&&&&&&&&&protected
&&&&&&&&&&&&&&&&reversed
&&&&at&end&&&&&&move&"Y"&to&user_exit.

&&&&perform&the_work&until&user_exit&=&"Y".

&&&&call&"sys$qiow"
&&&&&&&&using&&&by&value&&&&&&&&0,&mbx_chan,&io$_w riteof
&&&&&&&&&&&&&&&&by&reference&&&&iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,0,0,0,0,0,0,0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&cond_val&to&sy s_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..
*
fini.
&&&&stop&run.
*
parent_init&section.
00.
&&&&display&"-Processing&UAF&"&erase&screen.
&&&&open&input&uaf&allowing&all.
&&&&read&uaf&at&end&move&"Y"&to&eof_uaf.
&&&&perform&load_personae&until&eof_uaf&=&"Y".
&&&&display&"User&count&=&",&user_cnt&with&convers ion.
&&&&close&uaf.

&&&&call&"sys$crembx"
&&&&&&&&using&&&by&value&&&&&&&&0
&&&&&&&&&&&&&&&&by&reference&&&&mbx_chan
&&&&&&&&&&&&&&&&by&value&&&&&&&&512,&512,&0,&0
&&&&&&&&&&&&&&&&by&descriptor&&&"MY_MBX"
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..

&&&&call&"lib$spawn"
&&&&&&&&using&&&by&descriptor&&&"$run&t2"
&&&&&&&&&&&&&&&&by&value&&&&&&&&0
&&&&&&&&&&&&&&&&by&descriptor&&&"t2.log"
&&&&&&&&&&&&&&&&by&reference&&&&cli$m_nowait
&&&&&&&&&&&&&&&&by&value&&&&&&&&0
&&&&&&&&&&&&&&&&by&reference&&&&child_pid,&child_s tatus
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&child_exit_a st
&&&&&&&&&&&&&&&&by&reference&&&&child_params
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..

&&&&call&"sys$qiow"
&&&&&&&&using&&&by&value&&&&&&&&0,&mbx_chan,&io$_r eadvblk
&&&&&&&&&&&&&&&&by&reference&&&&iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,0
&&&&&&&&&&&&&&&&by&reference&&&&letter_recv
&&&&&&&&&&&&&&&&by&value&&&&&&&&512,0,0,0,0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&cond_val&to&sy s_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..
*
fini.
*
load_personae&section.
00.
&&&&call&"str$trim"
&&&&&&&&using&&&by&descriptor&&&uaf_username,&uaf_ username
&&&&&&&&&&&&&&&&by&reference&&&&username_len
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..

&&&&call&"sys$persona_create"
&&&&&&&&using&&&by&reference&&&&scratch_lw&
&&&&&&&&&&&&&&&&by&descriptor&&&uaf_username(1:use rname_len)
&&&&&&&&&&&&&&&&by&value&&&&&&&&iss$m_create_authp riv,&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal
&&&&&&&&add&1&to&user_cnt
&&&&else
&&&&&&&&if&sys_status&=&ss$_userdisabled&or&rms$_r nf
&&&&&&&&&&&&display&"User&",&uaf_username(1:userna me_len),&"&disabled."
&&&&&&&&else
&&&&&&&&&&&&display&"User&",&uaf_username(1:userna me_len),&"&failed."
&&&&&&&&&&&&call&"lib$stop"&using&by&value&sys_sta tus.
*
fini.
&&&&read&uaf&at&end&move&"Y"&to&eof_uaf.
*
the_work&section.
00.
&&&&move&function&upper-case&(new_name)&to&new_name.

&&&&call&"str$trim"
&&&&&&&&using&&&by&descriptor&&&new_name,&new_name
&&&&&&&&&&&&&&&&by&reference&&&&new_name_len
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..

&&&&call&"sys$persona_find"&using&work_persona,&fi nd_list&giving&sys_status.
&&&&if&sys_status&=&ss$_nomoreproc
&&&&&&&&display&"No&such&persona"
&&&&&&&&go&to&fini.

&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..


&&&&display&"Enter&new&password&&:&"&no&advancing.
&&&&accept&&&&&&new_password
&&&&&&&&&&&&&&&&protected
&&&&&&&&&&&&&&&&no&echo
&&&&at&end&&&&&&go&to&fini.

&&&&move&function&upper-case&(new_password)&to&new_password.

&&&&call&"sys$persona_delegate"&
&&&&&&&&using&&&child_pid,&
&&&&&&&&&&&&&&&&reserved_persona,&
&&&&&&&&&&&&&&&&work_persona
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..

&&&&call&"sys$qiow"
&&&&&&&&using&&&by&value&&&&&&&&0,&mbx_chan,&io$_w ritevblk
&&&&&&&&&&&&&&&&by&reference&&&&iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,0
&&&&&&&&&&&&&&&&by&reference&&&&letter_sent
&&&&&&&&&&&&&&&&by&value&&&&&&&&512,0,0,0,0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&cond_val&to&sy s_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..

&&&&call&"sys$qiow"
&&&&&&&&using&&&by&value&&&&&&&&0,&mbx_chan,&io$_r eadvblk
&&&&&&&&&&&&&&&&by&reference&&&&iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,0
&&&&&&&&&&&&&&&&by&reference&&&&letter_recv
&&&&&&&&&&&&&&&&by&value&&&&&&&&512,0,0,0,0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&cond_val&to&sy s_status.
&&&&if&sys_status&not&=&ss$_normal&and&ss$_endoffi le&
&&&&&&&&call&"lib$stop"&using&by&value&sys_status.
*
fini.
*
&&&&display&"Enter&new&username&&:&"&no&advancing.
&&&&accept&&&&&&new_name
&&&&&&&&&&&&&&&&protected
&&&&&&&&&&&&&&&&reversed
&&&&at&end&&&&&&move&"Y"&to&user_exit.
*
end&program&iss_disp.
identification&division.
program-id.&&&&child_exit_ast.
*
data&division.
linkage&section.
01&&child_params.
&&&&03&&child_status&&&&&&&&pic&9(9)&&&&comp.
&&&&03&&user_exit&&&&&&&&&&&pic&x.
procedure&division&using&child_params.
00.
&&&&if&user_exit&=&"N"
&&&&&&&&display&"Unexpected&child&exit"
&&&&&&&&call&"lib$stop"&using&by&value&child_statu s.
*
fini.
&&&&exit&program.
*
end&program&child_exit_ast.
$!
$cobolx/lis&t1
$linkx/notrace&t1,t
$inst_file&=&f$parse("t1.exe")&-&";"
$if&f$file_attributes(inst_file,"KNOWN")
$then
$&&&&&&&installx&replace&'inst_file'
$else
$&&&&&&&installx&add&'inst_file'&/share/priv=(sysprv)
$endif
$!
$create&t2.cob
identification&division.
program-id.&&&&iss_exec&with&ident&"v2.1".

author.&&&&&&&&Tier3&Software&Ltd.

data&division.
working-storage&section.
*
01&&io$_writevblk&&&&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&io$_writevb
lk.
01&&io$_readvblk&&&&&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&io$_readvbl
k.
01&&iss$c_id_natural&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&iss$c_id_na
tural.
01&&ss$_abort&&&&&&&&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&ss$_abort.
01&&ss$_personadelpend&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&ss$_persona
delpend.
01&&ss$_nomoreproc&&&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&ss$_nomorep
roc.
01&&ss$_endoffile&&&&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&ss$_endoffi
le.
01&&ss$_normal&&&&&&&&&&&&&&pic&9(9)&&&&comp&&&&va lue&&&external&ss$_normal.
01&&sys_status&&&&&&&&&&&&&&pic&9(9)&&&&comp.
*
01&&iosb.
&&&&03&&cond_val&&&&&&&&&&&&pic&9(4)&&&&comp.
&&&&03&&byte_count&&&&&&&&&&pic&9(4)&&&&comp.
&&&&03&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&comp.
*
01&&parent_list.
&&&&03&&item_master_pid.
&&&&&&&&05&&&&&&&&&&&&&&&&&&pic&9(4)&&&&comp&&&&va lue&&&4.
&&&&&&&&05&&&&&&&&&&&&&&&&&&pic&9(4)&&&&comp&&&&va lue&&&external&jpi$_owner.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&va lue&&&reference&parent_pid
..
&&&&&&&&05&&&&&&&&&&&&&&&&&&pic&9(9)&&&&comp.
&&&&03&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&comp.
*
01&&user_list.
&&&&03&&item_username.
&&&&&&&&05&&&&&&&&&&&&&&&&&&pic&9(4)&&&&comp&&&&va lue&&&12.
&&&&&&&&05&&&&&&&&&&&&&&&&&&pic&9(4)&&&&comp&&&&va lue&&&external&jpi$_userna
me.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&va lue&&&reference&curr_usern
ame.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&va lue&&&reference&curr_usern
ame_len.
&&&&03&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&comp.
*
01&&jpi_iosb.
&&&&03&&jpi_sts&&&&&&&&&&&&&pic&9(4)&&&&comp.
&&&&03&&&&&&&&&&&&&&&&&&&&&&pic&x(6).
*
01&&parent_pid&&&&&&&&&&&&&&pic&9(9)&&&&comp.
01&&curr_username&&&&&&&&&&&pic&x(12).
01&&curr_username_len&&&&&&&pic&9(4)&&&&comp.
01&&scratch_persona&&&&&&&&&pic&9(9)&&&&comp.
01&&mbx_chan&&&&&&&&&&&&&&&&pic&9(4)&&&&comp.
01&&cmd_eof&&&&&&&&&&&&&&&&&pic&x&&&&&&&&&&&&&&&va lue&&&"N".
01&&letter_sent.
&&&&03&&new_name&&&&&&&&&&&&pic&x(12).
&&&&03&&new_password&&&&&&&&pic&x(31).
&&&&03&&&&&&&&&&&&&&&&&&&&&&pic&x(469).
01&&password_len&&&&&&&&&&&&pic&9(4)&&&&comp.

01&&db_spec&&&&&&&&&&&&&&&&&pic&x(50)&&&&&&&&&&&va lue&"alias&pers&filename&m
f_personnel".

01&rdb$message_vector&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&external.
&&&&03&rdb$lu_num_arguments&pic&9(9)&&&&comp.
&&&&03&rdb$lu_status&&&&&&&&pic&9(9)&&&&comp.
&&&&03&rdb$alu_arguments&&&&&&&&&&&&&&&&&&&&&&&&oc curs&18&times.
&&&&&&&&05&rdb$lu_arguments&pic&9(9)&&&&comp.

01&&sqlcode&&&&&&&&&&&&&&&&&pic&9(9)&&&&comp.
01&&system_user&&&&&&&&&&&&&pic&x(31).
01&&session_user&&&&&&&&&&&&pic&x(31).
01&&current_user&&&&&&&&&&&&pic&x(31).
01&&auth_string&&&&&&&&&&&&&pic&x(60).
*
01&&find_list.
&&&&03&&item_username.
&&&&&&&&05&&new_name_len&&&&pic&9(4)&&&&comp.
&&&&&&&&05&&&&&&&&&&&&&&&&&&pic&9(4)&&&&comp&&&&va lue&&&external&iss$_userna
me.
&&&&&&&&05&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&pointer&va lue&&&reference&new_name.
&&&&&&&&05&&&&&&&&&&&&&&&&&&pic&9(9)&&&&comp.
&&&&03&&&&&&&&&&&&&&&&&&&&&&pic&9(9)&&&&comp.
*
procedure&division.
kick_off&section.
00.
&&&&call&"sys$getjpiw"
&&&&&&&&using&&&by&value&&&&&&&&0,&0,&0
&&&&&&&&&&&&&&&&by&reference&&&&parent_list,&jpi_i osb
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&jpi_sts&to&sys _status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..

&&&&call&"sys$assign"
&&&&&&&&using&&&by&descriptor&&&"MY_MBX"
&&&&&&&&&&&&&&&&by&reference&&&&mbx_chan
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..

&&&&call&"declare_connection_name"&using&sqlcode,& db_spec.
&&&&if&rdb$lu_status&not&=&ss$_normal
&&&&&&&&&call&"sys$putmsg"&using&rdb$message_vecto r
&&&&&&&&&call&"lib$stop"&using&by&value&ss$_abort. &&&&&

&&&&perform&get_cmd.

&&&&perform&the_work&until&cmd_eof&=&"Y".

&&&&stop&run.
*
the_work&section.
00.
&&&&call&"sys$getjpiw"
&&&&&&&&using&&&by&value&&&&&&&&0,&0,&0
&&&&&&&&&&&&&&&&by&reference&&&&user_list,&jpi_ios b
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&jpi_sts&to&sys _status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..

&&&&display&"Before&username&",&curr_username(1:cu rr_username_len).
&&&&call&"str$trim"&
&&&&&&&&using&&&by&descriptor&&&new_name,&new_name
&&&&&&&&&&&&&&&&by&reference&&&&new_name_len
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..

&&&&call&"sys$persona_assume"
&&&&&&&&using&&&by&reference&&&&scratch_persona
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..
*+
*&This&is&where&I&would&like&to&call:-
*
*&&&&&&&SQL>&SET&SESSION&AUTHORIZATION;
*
&&&&call&"str$trim"&
&&&&&&&&using&&&by&descriptor&&&new_password,&new_ password
&&&&&&&&&&&&&&&&by&reference&&&&password_len
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..

&&&&move&spaces&to&auth_string.
&&&&string&&&&&&"user&'",&new_name,&"'&using&'" ,&
&&&&&&&&&&&&&&&&new_password&(1assword_len),&"'"
&&&&&&&&&&&&&&&&delimited&by&size
&&&&&&&&into&&&&auth_string.
*+
*&User&must&have&SELECT&priv&to&database&to&do&thi s.
*-
&&&&call&"set_auth"&using&sqlcode,&auth_string.
&&&&if&rdb$lu_status&not&=&ss$_normal
&&&&&&&&&call&"sys$putmsg"&using&rdb$message_vecto r
&&&&&&&&&call&"lib$stop"&using&by&value&ss$_abort. &&&&&&

&&&&call&"set_trans_rw"&using&sqlcode.
&&&&if&rdb$lu_status&not&=&ss$_normal
&&&&&&&&&call&"sys$putmsg"&using&rdb$message_vecto r
&&&&&&&&&call&"lib$stop"&using&by&value&ss$_abort. &&&&&&

&&&&call&"get_user"&
&&&&&&&&using&&&sqlcode,
&&&&&&&&&&&&&&&&system_user,
&&&&&&&&&&&&&&&&session_user,
&&&&&&&&&&&&&&&&current_user.
&&&&if&rdb$lu_status&not&=&ss$_normal
&&&&&&&&&call&"sys$putmsg"&using&rdb$message_vecto r
&&&&&&&&&call&"lib$stop"&using&by&value&ss$_abort. &&&&&&

&&&&display&"System&&User&=&",&system_user.
&&&&display&"Session&User&=&",&session_user.
&&&&display&"Current&User&=&",&current_user.

&&&&call&"commit_trans"&using&sqlcode.
&&&&if&rdb$lu_status&not&=&ss$_normal
&&&&&&&&&call&"sys$putmsg"&using&rdb$message_vecto r
&&&&&&&&&call&"lib$stop"&using&by&value&ss$_abort. &&&&&&
*
&&&&call&"sys$getjpiw"
&&&&&&&&using&&&by&value&&&&&&&&0,&0,&0
&&&&&&&&&&&&&&&&by&reference&&&&user_list,&jpi_ios b
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&jpi_sts&to&sys _status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..

&&&&display&"After&username&",&curr_username(1:cur r_username_len).

fini.
&&&&call&"sys$persona_assume"
&&&&&&&&using&&&by&reference&&&&iss$c_id_natura l
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,&0,&0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..
*+
*&Unfortunately&personas&appear&to&be&write-once&structures&so,&instead&
*&of&being&able&to&delegate&a&different&persona&to &the&same&"reserved"
*&persona&area,&we&have&to&delete&the&old&one&and& re-reserve&a&new&one.
*-
&&&&call&"sys$persona_delete"&using&scratch_person a&giving&sys_status.
&&&&if&sys_status&not&=&ss$_normal&and&ss$_persona delpend
&&&&&&&&call&"lib$stop"&using&by&value&sys_status.

&&&&if&sys_status&=&ss$_personadelpend&display&"De lete&pending".

&&&&call&"sys$persona_find"&using&scratch_persona, &find_list&giving&sys_stat
us.
&&&&evaluate&&&&sys_status
&&&&&&&&when&&&&ss$_nomoreproc&&display&"This&is&w hat&I&expected&-&Deleted&O
k"
&&&&&&&&when&&&&ss$_normal&&&&&&display&"It&took&a &lickin'&but&it's&kept&on&
tickin'"
&&&&&&&&when&&&&other&&&&&&&&&&&call&"lib$stop"&us ing&by&value&sys_status
&&&&end-evaluate.

&&&&perform&get_cmd.
*
get_cmd&section.
00.
&&&&call&"sys$persona_reserve"&using&parent_pid,&s cratch_persona&giving&sys_
status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..

&&&&call&"sys$qiow"
&&&&&&&&using&&&by&value&&&&&&&&0,&mbx_chan,&io$_w ritevblk
&&&&&&&&&&&&&&&&by&reference&&&&iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,0
&&&&&&&&&&&&&&&&by&reference&&&&scratch_persona
&&&&&&&&&&&&&&&&by&value&&&&&&&&4,0,0,0,0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&cond_val&to&sy s_status.
&&&&if&sys_status&not&=&ss$_normal&call&"lib$stop" &using&by&value&sys_status
..

&&&&call&"sys$qiow"
&&&&&&&&using&&&by&value&&&&&&&&0,&mbx_chan,&io$_r eadvblk
&&&&&&&&&&&&&&&&by&reference&&&&iosb
&&&&&&&&&&&&&&&&by&value&&&&&&&&0,0
&&&&&&&&&&&&&&&&by&reference&&&&letter_sent
&&&&&&&&&&&&&&&&by&value&&&&&&&&512,0,0,0,0
&&&&&&&&giving&&sys_status.
&&&&if&sys_status&=&ss$_normal&move&cond_val&to&sy s_status.
&&&&if&sys_status&=&ss$_endoffile
&&&&&&&&move&"Y"&to&cmd_eof
&&&&else
&&&&&&&&if&sys_status&not&=&ss$_normal
&&&&&&&&&&&&call&"lib$stop"&using&by&value&sys_sta tus.
*
end&program&iss_exec.
$!
$cobolx/lis&t2
$create&t2_sql.sqlmod

module&&&&t2_sql
language&&cobol
parameter&colons

declare&pers&alias&filename&mf_personnel

procedure&declare_connection_name
&&&&&&&&sqlcode,
&&&&&&&&:db_spec&&&&&&&&char(50);

&&&&&&&&attach&:db_spec;

procedure&set_trans_rw
&&&&&&&&sqlcode;

&&&&&&&&set&transaction&read&only;


procedure&commit_trans
&&&&&&&&sqlcode;

&&&&&&&&commit;

procedure&set_auth
&&&&&&&&sqlcode,
&&&&&&&&:auth_string&&&&char(60);

&&&&&&&&set&session&authorization&:auth_string;

procedure&get_user
&&&&&&&&sqlcode
&&&&&&&&:sys_user&&&&&&&char(31),
&&&&&&&&:ses_user&&&&&&&char(31),
&&&&&&&&:cur_user&&&&&&&char(31);

&&&&&&&&select
&&&&&&&&&&&&&&&&system_user,
&&&&&&&&&&&&&&&&current_user,
&&&&&&&&&&&&&&&&session_user
&&&&&&&&into
&&&&&&&&&&&&&&&&:sys_user,
&&&&&&&&&&&&&&&&:cur_user,
&&&&&&&&&&&&&&&&:ses_user
&&&&&&&&from
&&&&&&&&&&&&&&&&pers.employees
&&&&&&&&limit&to&1&row;

procedure&disconnect_db
&&&&&&&&sqlcode;

&&&&&&&&disconnect&default;

$!
$sqlmod:==$sql$mod
$sqlmod&t2_sql/lis/session
$linkx&t2,t,t2_sql,sql$user/lib
$!
$set&process/priv=(noall,tmpmbx,impersonate)
$!
$exit
$!
$no_priv:
$&&&&&&&write&sys$output&"Insufficient&privilege.& You&need&(CMKRNL,IMPERSONA
TE,TMPMBX)"
$&&&&&&&exit&44
$!
$no_vax:
$&&&&&&&write&sys$output&"This&code&only&works&on& alpha"
$&&&&&&&exit&44
$!
  Reply With Quote
3 2nd June 19:20
richard maher
External User
 
Posts: 1
Default Rdb's impact on $persona_delete ss$_personadelpend


Here's the original mail : -


----- Original Message -----
From: "Richard Maher"
Sent: Sunday, November 04, 2001 6:56 PM
Subject: Re: Wishlist - sort of (More SSA)

you

be


"declare_connection_name"

in


the
  Reply With Quote
4 2nd June 19:20
kilgallen
External User
 
Posts: 1
Default Rdb's impact on $persona_delete ss$_personadelpend


In article <d0bokl$rua$1@sparta.btinternet.com>, "Richard Maher" <maher_rj@hotspamnotmail.com> writes:


From an internals perspective, it seems to me it was retaining a handle
to the persona beyond its apparent lifetime.

Well, yes and no. While the political drivel is annoying, this nuance
of a small bugfix may not be worth discussion. Certainly it should have
been in the release notes (and I have not looked myself to see that it
is missing), but learning the details does not seem really useful to
those of us who do not have regular access to the source of Rdb.

Perhaps the best lesson learned would be if someone from Rdb would
give the details to VMS Do***entation to see if something about
persona manipulation needs more emphasis in the do***entation.
  Reply With Quote
5 2nd June 19:20
richard maher
External User
 
Posts: 1
Default Rdb's impact on $persona_delete ss$_personadelpend


Hi Larry,


Excellent! How exactly would one accomplish that?

Why does it appear to be only me that sees this persona stuff as heralding
in nothing less than a revolutionary, avant-garde sea-change in server
system design? I understand that there are developers out there, such as
yourself, that see a thousand users and automatically create a thousand
threads but if you take a minute to allow for the possibility that there may
be advantages in a design where a given process may wish to swap persona for
each unit of work in a client/server environment then you might just find it
useful to obtain the answers to the conundrums that I am posing. (ACMS has
certainly never done this, and dear God please let it be true that Rdb
engineering has been tightening up it's session level security all these
years!!!)

I Agree 100%

Regards Richard Maher


<maher_rj@hotspamnotmail.com> writes:
  Reply With Quote
6 2nd June 19:20
norman lastovica
External User
 
Posts: 1
Default Rdb's impact on $persona_delete ss$_personadelpend


so if I understand ... something that didn't work several
years ago now works and you're concerned about why? just
good luck and a bug fix by either VMS and/or Rdb. I've
certainly got a lot better things to do than try search around
for an old problem being fixed. But thanks for thinking of us.


--
- - - - -
opinions expressed here are mine and mine alone
and certainly are not intended in any way to
express or represent any opinions or commitment
of oracle corporation.

norman lastovica / oracle rdb engineering
  Reply With Quote
7 2nd June 19:20
richard maher
External User
 
Posts: 1
Default Rdb's impact on $persona_delete ss$_personadelpend


Hi,

So, in summary, that's one big "Marginally more interesting than watching
paint dry." from a guy that's dedicated a large portion of his life to
System Security, and one emphatic "Couldn't give a Monkey's!" from an
engineer at the very hub of Rdb development. So having explored all avenues
I guess we can put this thread to bed now :-)

Cheers Richard Maher

PS. Just because I haven't found anyone yet, it doesn't mean that there
aren't people out there that find this stuff captivating. (I just don't want
any other losers out there to be discouraged from overcoming their shyness
:-)


smell
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666